Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alecthomas/kong
/ functions
Functions
738 in github.com/alecthomas/kong
⨍
Functions
738
◇
Types & classes
229
↓ 1 callers
Function
checkMissingPositionals
If we're missing any positionals and they're required, return an error.
context.go:1026
↓ 1 callers
Function
checkOverlappingXorAnd
(k *Kong)
kong.go:181
↓ 1 callers
Function
checkPassthroughArg
(target reflect.Value)
context.go:1086
↓ 1 callers
Function
checkXorDuplicatedAndAndMissing
(paths []*Path)
context.go:1096
↓ 1 callers
Function
checkXorDuplicates
(paths []*Path)
context.go:1110
↓ 1 callers
Function
collectCommandGroups
(nodes []*Node)
help.go:342
↓ 1 callers
Function
collectFlagGroups
(flags [][]*Flag)
help.go:290
↓ 1 callers
Function
counterMapper
()
mapper.go:790
↓ 1 callers
Function
durationDecoder
()
mapper.go:328
↓ 1 callers
Method
endParsing
()
context.go:377
↓ 1 callers
Function
existingDirMapper
(r *Registry)
mapper.go:684
↓ 1 callers
Function
existingFileMapper
(r *Registry)
mapper.go:648
↓ 1 callers
Function
exitCodeFromError
exitCodeFromError returns the exit code for the given error. If err implements the exitCoder interface, the ExitCode method is called. Otherwise, exit
exit.go:23
↓ 1 callers
Method
extraFlags
Provide additional builtin flags, if any.
kong.go:293
↓ 1 callers
Function
fileContentMapper
(r *Registry)
mapper.go:718
↓ 1 callers
Function
fileMapper
(r *Registry)
mapper.go:617
↓ 1 callers
Method
findNode
(key reflect.Value)
model.go:80
↓ 1 callers
Function
flattenedFields
(v reflect.Value, ptag *Tag)
build.go:56
↓ 1 callers
Function
flipBoolValue
(value reflect.Value)
context.go:737
↓ 1 callers
Function
floatDecoder
(bits int)
mapper.go:428
↓ 1 callers
Function
formatEnvs
(envs []string)
help.go:580
↓ 1 callers
Function
formatFlag
haveShort will be true if there are short flags present at all in the help. Useful for column alignment.
help.go:502
↓ 1 callers
Function
getExplicitMethod
(value reflect.Value, name string)
callbacks.go:131
↓ 1 callers
Method
getMethods
(value reflect.Value, name string)
kong.go:389
↓ 1 callers
Function
getRequiredAndGroupMap
(flags []*Flag)
context.go:970
↓ 1 callers
Function
getValidators
getValidators returns validators implemented by v and by any embedded fields, matching how hooks are discovered (see getMethods).
context.go:1207
↓ 1 callers
Function
guessWidth
(w io.Writer)
guesswidth.go:7
↓ 1 callers
Function
handle
Handle a single SSH interactive connection.
_examples/server/main.go:22
↓ 1 callers
Function
handlerWithError
(handle func(log *log.Logger, s ssh.Session) error)
_examples/server/main.go:115
↓ 1 callers
Method
head
()
kong.go:212
↓ 1 callers
Function
intDecoder
(bits int)
mapper.go:370
↓ 1 callers
Function
isExplicitMethod
(t reflect.Type, name string)
callbacks.go:141
↓ 1 callers
Function
isUnknownFlagError
(err error)
context.go:808
↓ 1 callers
Function
isValidatable
(v reflect.Value)
context.go:1189
↓ 1 callers
Function
levenshtein
Copied from https://github.com/daviddengcn/go-algs/blob/fe23fabd9d0670e4675326040ba7c285c7117b4c/ed/ed.go#L31 License: https://github.com/daviddengcn/
levenshtein.go:7
↓ 1 callers
Function
mapDecoder
(r *Registry)
mapper.go:458
↓ 1 callers
Function
maybeGetSignature
(t reflect.Type)
tag.go:427
↓ 1 callers
Method
maybeSelectDefault
End of the line, check for a default command, but only if we're not displaying help, otherwise we'd only ever display the help for the default command
context.go:594
↓ 1 callers
Function
min
(a, b int)
levenshtein.go:34
↓ 1 callers
Function
newFunctionBinding
newFunctionBinding builds a binding with a function that will return a value of the target type. The function signature must be func(...) (T, error)
callbacks.go:38
↓ 1 callers
Method
parseFlag
(flags []*Flag, match string)
context.go:753
↓ 1 callers
Function
parseStructTagItems
(tag reflect.StructTag)
tag.go:169
↓ 1 callers
Function
parseTag
(parent reflect.Value, ft reflect.StructField)
tag.go:213
↓ 1 callers
Function
parseTagString
(s string)
tag.go:198
↓ 1 callers
Function
pathMapper
(r *Registry)
mapper.go:582
↓ 1 callers
Method
pop
()
kong.go:213
↓ 1 callers
Function
printApp
(w *helpWriter, app *Application)
help.go:142
↓ 1 callers
Function
printCommand
(w *helpWriter, app *Application, cmd *Command)
help.go:158
↓ 1 callers
Function
printCommandSummary
(w *helpWriter, cmd *Command)
help.go:373
↓ 1 callers
Method
push
(vars Vars)
kong.go:214
↓ 1 callers
Function
reflectValueIsZero
This is directly from the Go 1.13 source code.
model.go:489
↓ 1 callers
Function
removeIgnored
(fields []flattenedField, ignored map[string]bool)
build.go:119
↓ 1 callers
Method
selectedValues
selectedValues returns the set of values attached to nodes on the traced command path.
context.go:365
↓ 1 callers
Function
siftStrings
(ss []string, filter func(s string) bool)
options.go:506
↓ 1 callers
Function
snakeCase
(name string)
resolver.go:65
↓ 1 callers
Function
timeDecoder
()
mapper.go:351
↓ 1 callers
Method
trace
nolint:maintidx
context.go:393
↓ 1 callers
Function
uintDecoder
(bits int)
mapper.go:399
↓ 1 callers
Function
urlMapper
()
mapper.go:831
↓ 1 callers
Function
validatePositionalArguments
(node *Node)
build.go:228
↓ 1 callers
Function
visitNodeChildren
(node *Node, visitor Visitor)
visit.go:36
↓ 1 callers
Function
writeCommandList
(cmds []*Node, iw *helpWriter)
help.go:248
↓ 1 callers
Function
writeCommandTree
(w *helpWriter, node *Node)
help.go:271
↓ 1 callers
Function
writeCompactCommandList
(cmds []*Node, iw *helpWriter)
help.go:260
↓ 1 callers
Function
writeFlags
(w *helpWriter, groups [][]*Flag)
help.go:445
↓ 1 callers
Function
writePositionals
(w *helpWriter, args []*Positional)
help.go:437
Method
AfterApply
This is not the correct signature - see README for details.
hooks.go:24
Method
AfterApply
(ctx *hookContext)
kong_test.go:540
Method
AfterApply
(ctx *hookContext)
kong_test.go:555
Method
AfterApply
(cli *cliWithHook)
kong_test.go:1089
Method
AfterApply
(ctx *kong.Context)
kong_test.go:1099
Method
AfterApply
()
kong_test.go:2666
Method
AfterApply
()
kong_test.go:2677
Method
AfterApply
()
kong_test.go:2686
Method
AfterApply
()
kong_test.go:2697
Method
AfterApply
()
kong_test.go:2729
Method
AfterApply
()
kong_test.go:2753
Method
AfterApply
()
kong_test.go:2786
Method
AfterRun
This is not the correct signature - see README for details. AfterRun is called after Run() returns.
hooks.go:31
Method
AfterRun
()
kong_test.go:2620
Method
Apply
Apply options to Kong as a configuration option.
help.go:71
Method
Apply
(k *Kong)
options.go:23
Method
Apply
Apply lets Vars act as an Option.
options.go:31
Method
Apply
(k *Kong)
options.go:363
Method
Apply
Apply traced context to the target grammar.
context.go:709
Method
Apply
(k *kong.Kong)
kong_test.go:1913
Method
BeforeApply
This is not the correct signature - see README for details.
hooks.go:18
Method
BeforeApply
(ctx *hookContext)
kong_test.go:535
Method
BeforeApply
(ctx *hookContext)
kong_test.go:550
Method
BeforeApply
(app *kong.Kong, vars kong.Vars)
_examples/docker/main.go:27
Method
BeforeReset
(ctx *Context)
help.go:21
Method
BeforeReset
This is not the correct signature - see README for details.
hooks.go:6
Method
BeforeReset
BeforeReset writes the version variable and terminates with a 0 exit status.
util.go:33
Method
BeforeResolve
This is not the correct signature - see README for details.
hooks.go:12
Method
BeforeResolve
BeforeResolve adds a resolver.
util.go:16
Function
BenchmarkKong_interpolate
(b *testing.B)
benchmark_test.go:11
Function
Benchmark_interpolateValue
(b *testing.B)
benchmark_test.go:53
Method
BindSingletonProvider
BindSingletonProvider allows binding of provider functions. The provider will be called once and the result cached. "provider" must be a function wit
context.go:148
Method
BindTo
BindTo adds a binding to the Context. This will typically have to be called like so: BindTo(impl, (*MyInterface)(nil))
context.go:128
Function
ClearResolvers
ClearResolvers clears all existing resolvers.
options.go:409
← previous
next →
201–300 of 738, ranked by callers