Skip to content

Commit 6c78afd

Browse files
committed
Run make docs
1 parent 596e7c5 commit 6c78afd

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

testdata/godoc-v3.x.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,11 +854,19 @@ func (i MapBase[T, C, VC]) ToString(t map[string]T) string
854854
func (i *MapBase[T, C, VC]) Value() map[string]T
855855
Value returns the mapping of values set by this flag
856856

857-
type MapSource struct {
858-
// Has unexported fields.
857+
type MapSource interface {
858+
fmt.Stringer
859+
fmt.GoStringer
860+
861+
// Lookup returns the value from the source based on key
862+
// and if it was found
863+
// or returns an empty string and false
864+
Lookup(string) (any, bool)
859865
}
866+
MapSource is a source which can be used to look up a value based on a key
867+
typically for use with a cli.Flag
860868

861-
func NewMapSource(name string, m map[any]any) *MapSource
869+
func NewMapSource(name string, m map[any]any) MapSource
862870

863871
type MultiError interface {
864872
error
@@ -1012,7 +1020,7 @@ func EnvVar(key string) ValueSource
10121020

10131021
func File(path string) ValueSource
10141022

1015-
func NewMapValueSource(key string, ms *MapSource) ValueSource
1023+
func NewMapValueSource(key string, ms MapSource) ValueSource
10161024

10171025
type ValueSourceChain struct {
10181026
Chain []ValueSource

0 commit comments

Comments
 (0)