Skip to content

Commit 1df6b84

Browse files
committed
docs: update godoc-current.txt
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
1 parent fbcbd0f commit 1df6b84

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

godoc-current.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,30 @@ type SuggestCommandFunc func(commands []*Command, provided string) string
977977

978978
type SuggestFlagFunc func(flags []Flag, provided string, hideHelp bool) string
979979

980+
type TextFlag = FlagBase[TextMarshalUnMarshaller, StringConfig, TextValue]
981+
TextFlag enables you to set types that satisfies TextMarshalUnMarshaller
982+
using flags such as log levels.
983+
984+
type TextMarshalUnMarshaller interface {
985+
encoding.TextMarshaler
986+
encoding.TextUnmarshaler
987+
}
988+
989+
type TextValue struct {
990+
Value TextMarshalUnMarshaller
991+
Config StringConfig
992+
}
993+
994+
func (v TextValue) Create(t TextMarshalUnMarshaller, _ *TextMarshalUnMarshaller, c StringConfig) Value
995+
996+
func (v TextValue) Get() any
997+
998+
func (v TextValue) Set(s string) error
999+
1000+
func (v TextValue) String() string
1001+
1002+
func (v TextValue) ToString(t TextMarshalUnMarshaller) string
1003+
9801004
type TimestampArg = ArgumentBase[time.Time, TimestampConfig, timestampValue]
9811005

9821006
type TimestampConfig struct {

0 commit comments

Comments
 (0)