Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alecthomas/kong
/ types & classes
Types & classes
229 in github.com/alecthomas/kong
⨍
Functions
738
◇
Types & classes
229
↓ 29 callers
FuncType
OptionFunc
OptionFunc is function that adheres to the Option interface.
options.go:21
↓ 3 callers
TypeAlias
impl
options_test.go:23
↓ 2 callers
TypeAlias
ProvidedString
kong_test.go:2635
↓ 2 callers
TypeAlias
signatureFlag
Non-struct type implementing Signature as a flag.
signature_test.go:110
↓ 1 callers
TypeAlias
ChangeDirFlag
ChangeDirFlag changes the current working directory to a path specified by a flag early in the parsing process, changing how other flags resolve relat
util.go:45
↓ 1 callers
TypeAlias
Foo
kong_test.go:2395
↓ 1 callers
FuncType
MapperFunc
A MapperFunc is a single function that complies with the Mapper interface.
mapper.go:143
↓ 1 callers
FuncType
ResolverFunc
ResolverFunc is a convenience type for non-validating Resolvers.
resolver.go:21
↓ 1 callers
TypeAlias
VersionFlag
_examples/docker/main.go:23
↓ 1 callers
FuncType
commandFunc
func() error
kong_test.go:1753
↓ 1 callers
TypeAlias
jsonUnmarshalerValue
mapper_test.go:57
↓ 1 callers
TypeAlias
npError
options_test.go:186
↓ 1 callers
FuncType
validatableFunc
Proxy a validatable function to the extendedValidatable interface
context.go:1185
Struct
A
kong_test.go:1381
Interface
AfterApply
AfterApply is a documentation-only interface describing hooks that run after values are set.
hooks.go:22
Interface
AfterRun
AfterRun is a documentation-only interface describing hooks that run after Run() returns.
hooks.go:28
Struct
Anonymous
help_test.go:487
Struct
Anonymous
resolver_test.go:92
Struct
Anonymous
kong_test.go:956
Struct
Application
Application is the root of the Kong model.
model.go:18
Struct
AttachCmd
_examples/docker/commands.go:6
Struct
B
kong_test.go:1385
Interface
BeforeApply
BeforeApply is a documentation-only interface describing hooks that run before values are set.
hooks.go:16
Interface
BeforeReset
BeforeReset is a documentation-only interface describing hooks that run before defaults values are applied.
hooks.go:4
Interface
BeforeResolve
BeforeResolve is a documentation-only interface describing hooks that run before resolvers are applied.
hooks.go:10
Interface
BoolMapper
A BoolMapper is a Mapper to a value that is a boolean. This is used solely for formatting help.
mapper.go:131
Interface
BoolMapperExt
BoolMapperExt allows a Mapper to dynamically determine if a value is a boolean.
mapper.go:137
Interface
BoolMapperValue
BoolMapperValue may be implemented by fields in order to provide custom mappings for boolean values.
mapper.go:51
Struct
BuildCmd
_examples/docker/commands.go:21
Struct
CLI
mapper_test.go:338
Struct
CLI
mapper_windows_test.go:29
Struct
CLI
tag_test.go:117
Struct
CLI
kong_test.go:979
Struct
CLI
defaults_test.go:11
Struct
CLI
_examples/docker/main.go:33
Struct
Cli
resolver_test.go:235
Struct
ClientA
options_test.go:143
Struct
ClientB
options_test.go:144
Struct
Command
tag_test.go:170
Struct
CommitCmd
_examples/docker/commands.go:29
Struct
Config
kong_test.go:906
TypeAlias
ConfigFlag
ConfigFlag uses the configured (via kong.Configuration(loader)) configuration loader to load configuration from a file specified by a flag. Use this
util.go:13
FuncType
ConfigurationLoader
ConfigurationLoader is a function that builds a resolver from a file.
options.go:450
Struct
Connection
options_test.go:142
Struct
Context
Context contains the current parse context.
context.go:81
Struct
CpCmd
_examples/docker/commands.go:37
Struct
CreateCmd
_examples/docker/commands.go:45
Struct
DBConfig
kong_test.go:2823
Struct
DecodeCLI
mapper_test.go:819
Struct
DecodeContext
DecodeContext is passed to a Mapper's Decode(). It contains the Value being decoded into and the Scanner to parse from.
mapper.go:29
Struct
DecodeFoo
mapper_test.go:823
Struct
DeployCmd
_examples/docker/commands.go:53
Struct
DiffCmd
_examples/docker/commands.go:61
Struct
Embed
resolver_test.go:232
Struct
Embed
kong_test.go:1042
Struct
Embedded
tag_test.go:156
Struct
Embedded
kong_test.go:1005
Struct
Embedded2
kong_test.go:1009
Struct
EmbeddedAfterApplyLeaf
kong_test.go:2749
Struct
EmbeddedAfterApplyMiddle
kong_test.go:2758
Struct
EmbeddedAfterApplyRoot
kong_test.go:2762
Struct
EmbeddedCallback
kong_test.go:2660
Struct
EmbeddedRoot
kong_test.go:2691
Struct
EventsCmd
_examples/docker/commands.go:69
Struct
ExecCmd
_examples/docker/commands.go:77
Interface
ExitCoder
ExitCoder is an interface that may be implemented by an error value to provide an integer exit code. The method ExitCode should return an integer that
exit.go:16
Struct
ExportCmd
_examples/docker/commands.go:85
TypeAlias
FileContentFlag
FileContentFlag is a flag value that loads a file's contents into its value.
mapper.go:921
Struct
Flag
A Flag represents a command-line flag.
model.go:422
Struct
Foo
kong_test.go:2525
Struct
Globals
_examples/docker/main.go:10
Struct
Group
Group holds metadata about a command or flag group used when printing help.
model.go:478
TypeAlias
Groups
Groups associates `group` field tags with group metadata. This option is used to simplify Kong tags while providing rich group information such as ti
options.go:361
FuncType
HelpIndenter
HelpIndenter is used to indent new layers in the help tree.
help.go:88
Struct
HelpOptions
HelpOptions for HelpPrinters.
help.go:33
FuncType
HelpPrinter
HelpPrinter is used to print context-sensitive help.
help.go:91
Interface
HelpProvider
HelpProvider can be implemented by commands/args to provide detailed help.
help.go:77
FuncType
HelpValueFormatter
HelpValueFormatter is used to format the help text of flags and positional arguments.
help.go:94
Struct
HistoryCmd
_examples/docker/commands.go:93
Interface
IgnoreDefault
IgnoreDefault can be implemented by flags that want to be applied before any default commands.
context.go:588
Struct
ImagesCmd
_examples/docker/commands.go:101
Struct
ImportCmd
_examples/docker/commands.go:109
Struct
InfoCmd
_examples/docker/commands.go:117
Struct
InspectCmd
_examples/docker/commands.go:125
Struct
KillCmd
_examples/docker/commands.go:133
Struct
Kong
Kong is the main parser type.
kong.go:43
Struct
LoadCmd
_examples/docker/commands.go:141
Struct
LoginCmd
_examples/docker/commands.go:149
Struct
LogoutCmd
_examples/docker/commands.go:157
Struct
LogsCmd
_examples/docker/commands.go:165
Struct
LsCmd
kong_test.go:1398
Interface
Mapper
A Mapper represents how a field is mapped from command-line values to Go. Mappers can be associated with concrete fields via pointer, reflect.Type, r
mapper.go:118
Interface
MapperValue
MapperValue may be implemented by fields in order to provide custom mapping. Mappers may additionally implement PlaceHolderProvider to provide custom
mapper.go:46
Struct
NamedFileContentFlag
NamedFileContentFlag is a flag value that loads a file's contents and filename into its value.
mapper.go:894
Struct
NestedAnonymous
resolver_test.go:122
Struct
NestedCallback
kong_test.go:2682
FuncType
Next
Next should be called by Visitor to proceed with the walk. The walk will terminate if "err" is non-nil.
visit.go:10
Struct
Node
Node is a branch in the CLI. ie. a command or positional argument.
model.go:41
TypeAlias
NodeType
NodeType is an enum representing the type of a Node.
model.go:31
Interface
Option
An Option applies optional changes to the Kong application.
options.go:16
next →
1–100 of 229, ranked by callers