Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/avamsi/climate
/ functions
Functions
78 in github.com/avamsi/climate
⨍
Functions
78
◇
Types & classes
28
↓ 19 callers
Method
t
()
reflect.go:30
↓ 13 callers
Function
sliceParser
(typer typeParser[T])
strconv.go:33
↓ 9 callers
Method
Child
(name string)
internal/metadata.go:164
↓ 9 callers
Function
declareOption
(flagVarP flagTypeVarP[T], opt *option, typer typeParser[T])
options.go:61
↓ 7 callers
Method
v
()
reflect.go:44
↓ 5 callers
Function
WithMetadata
WithMetadata returns a modifier that sets the metadata to be used by Run for augmenting the CLI with additional information (for --help etc.).
climate.go:76
↓ 3 callers
Function
Func
Func returns an executable plan for the given function, which must conform to the following signatures (excuse the partial [optional] notation): fun
climate.go:28
↓ 3 callers
Method
Long
()
internal/metadata.go:114
↓ 3 callers
Method
Lookup
(pkgPath, name string)
internal/metadata.go:87
↓ 3 callers
Function
NormalizeToKebabCase
NormalizeToKebabCase normalizes the input string to ASCII kebab-case. It tries to convert non-ASCII runes in the input string to ASCII by decomposing
internal/strings.go:25
↓ 3 callers
Function
RunAndExit
RunAndExit executes the given plan and exits with the exit code.
climate.go:99
↓ 3 callers
Method
SetDoc
(doc *ast.CommentGroup)
internal/metadata.go:34
↓ 3 callers
Method
declare
()
options.go:86
↓ 2 callers
Function
DecodeAsRawMetadata
(b []byte)
internal/metadata.go:26
↓ 2 callers
Method
LookupType
(t reflect.Type)
internal/metadata.go:94
↓ 2 callers
Function
New
(p internal.Plan, mods ...func(*internal.RunOptions))
testing/clitest/clitest.go:21
↓ 2 callers
Function
Run
Run executes the given plan and returns the exit code.
climate.go:83
↓ 2 callers
Method
Short
()
internal/metadata.go:121
↓ 2 callers
Function
Struct
Struct returns an executable plan for the struct given as the type parameter, with its methods* (and "child" structs) as subcommands. * Only methods
climate.go:42
↓ 2 callers
Method
addCommand
(sub *command)
command.go:42
↓ 2 callers
Method
build
()
command.go:204
↓ 2 callers
Function
newCommand
(name string, md *internal.Metadata, params []internal.ParamType)
command.go:27
↓ 2 callers
Method
run
(ctx context.Context)
command.go:117
↓ 2 callers
Function
typeIsStructPointer
(t reflect.Type)
reflect.go:20
↓ 1 callers
Method
Aliases
()
internal/metadata.go:98
↓ 1 callers
Function
DecodeAsMetadata
(b []byte)
internal/metadata.go:81
↓ 1 callers
Method
Encode
()
internal/metadata.go:69
↓ 1 callers
Method
Execute
(context.Context, *Metadata)
internal/run.go:6
↓ 1 callers
Function
ParamTypes
(f reflect.Type)
internal/param.go:19
↓ 1 callers
Function
ParamsUsage
(names []string, types []ParamType)
internal/param.go:39
↓ 1 callers
Method
SetComment
(comment *ast.CommentGroup)
internal/metadata.go:53
↓ 1 callers
Method
Usage
(name string, args []ParamType)
internal/metadata.go:154
↓ 1 callers
Method
build
()
command.go:295
↓ 1 callers
Method
buildRecursive
(parent *reflection, md *internal.Metadata)
plan.go:35
↓ 1 callers
Method
defaultValue
()
options.go:40
↓ 1 callers
Function
exitCode
(err error)
climate.go:62
↓ 1 callers
Function
greet
Func is automatically converted to a command -- 1. Param names are converted to kebab-case and used* as part of the usage string ("command [opts]
cmd/examples/greet/main.go:40
↓ 1 callers
Function
newTags
(st reflect.StructTag)
options.go:23
↓ 1 callers
Function
parseFunc
(f *ast.FuncDecl, pkgMd *internal.RawMetadata)
cmd/cligen/main.go:22
↓ 1 callers
Function
parsePkg
(pkg *packages.Package, rootMd *internal.RawMetadata)
cmd/cligen/main.go:66
↓ 1 callers
Function
parseType
(g *ast.GenDecl, pkgMd *internal.RawMetadata)
cmd/cligen/main.go:44
↓ 1 callers
Function
pkgDir
(pkg *packages.Package)
cmd/cligen/main.go:91
↓ 1 callers
Method
required
()
options.go:45
↓ 1 callers
Method
run
(sig *runSignature)
command.go:155
↓ 1 callers
Method
shorthand
()
options.go:35
↓ 1 callers
Function
typeIsContext
(t reflect.Type)
reflect.go:10
↓ 1 callers
Function
typeIsError
(t reflect.Type)
reflect.go:16
↓ 1 callers
Function
version
()
command.go:46
↓ 1 callers
Function
versionCommand
(name, v string)
command.go:104
Method
Child
(name string)
internal/metadata.go:57
Method
Completion
Print a command-line-completion script.
cmd/examples/jj/util/completion.go:10
Function
ErrExit
ErrExit returns an exitError with the given exit code and errors. exitError is used to indicate that the CLI should exit with the given exit code (as
error.go:31
Function
ErrUsage
ErrUsage returns the given error wrapped in a usageError or nil otherwise. usageError is used to indicate there's something wrong with the user input
error.go:12
Method
Error
()
error.go:35
Method
Execute
(ctx context.Context, md *internal.Metadata)
plan.go:15
Method
Execute
(ctx context.Context, m *internal.Metadata)
plan.go:48
Method
Export
Update the underlying Git repo with changes made in the repo.
cmd/examples/jj/main.go:65
Method
Init
Create a new repo in the given directory.
cmd/examples/jj/main.go:33
Method
Remote
Manage Git remotes.
cmd/examples/jj/main.go:60
Method
Squash
Move changes from a revision into its parent. After moving the changes into the parent, the child revision will have the same content state as before
cmd/examples/jj/main.go:50
Function
TestMain
(t *testing.T)
cmd/examples/greet/main_test.go:12
Function
TestMain
(t *testing.T)
cmd/examples/jj/main_test.go:13
Function
TestNormalizeToKebabCase
(t *testing.T)
internal/strings_test.go:9
Function
TestSliceParser
(t *testing.T)
strconv_test.go:9
Method
Unwrap
()
error.go:19
Method
Unwrap
()
error.go:41
Function
cligen
cligen recursively parses the metadata of all Go packages in the current directory and its subdirectories, and writes it to the given output file.
cmd/cligen/main.go:104
Method
declare
()
options.go:163
Function
flagUsages
(fset *pflag.FlagSet)
command.go:78
Function
main
()
cmd/cligen/main.go:152
Function
main
()
cmd/examples/greet/main.go:52
Function
main
()
cmd/examples/jj/main.go:73
Function
parseBool
(s string)
strconv.go:11
Function
parseFloat64
(s string)
strconv.go:23
Function
parseInt64
(s string)
strconv.go:15
Function
parseString
(s string)
strconv.go:27
Function
parseUint64
(s string)
strconv.go:19
Function
validateNoArgs
(cmd *cobra.Command, args []string)
command.go:277