]> Cypherpunks.ru repositories - gostls13.git/commit
flag: add TextVar function
authorJoe Tsai <joetsai@digital-static.net>
Sun, 25 Apr 2021 05:55:58 +0000 (22:55 -0700)
committerJoseph Tsai <joetsai@digital-static.net>
Thu, 10 Mar 2022 16:56:17 +0000 (16:56 +0000)
commit91daaabd56964d0cffae99825e4696f3f70a3857
tree4ddd7dee7f7ea755d98d821cc1add1179772fcd6
parent2d026a4ea5b28680c1ed7660f720c4cb028c5b35
flag: add TextVar function

The TextVar function makes it easier to integrate the flag package
with any Go type that implements encoding.Text{Marshaler,Unmarshaler}.

Fixes #45754

Change-Id: Id23c37d59cf8c9699a7943a22ce27a45eb685c0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/313329
Trust: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
api/next.txt
src/flag/example_textvar_test.go [new file with mode: 0644]
src/flag/flag.go
src/go/build/deps_test.go