command
module
Version:
v0.0.0-...-0640b79
Opens a new window with list of versions in this module.
Published: Jan 9, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Go CLI sample project
Info
Precedence
The precedence for flag value sources is as follows (highest to lowest):
- Command line flag value from user
- Environment variable from user (if specified)
- Configuration file (if specified)
[FilePath]
- Environment variable (if specified)
[EnvVar]
- Default defined on the flag
[Value]
Autocompletion
zsh example
go build examples/bash-completion.go
PROG=bash-completion source <(bash-completion autocompletion zsh)
bash-completion
# now play with tab
BASH
Source the autocomplete-scripts/bash_autocomplete
file in your .bashrc
or .bash_profile
file.
go build .
source <(go-cli autocompletion bash)
go-cli
# now play with tab
ZSH
Source the autocomplete-scripts/zsh_autocomplete
file in your .zshrc
file while setting the PROG
variable to the name of your program.
go build .
PROG=go-cli source <(go-cli autocompletion zsh)
go-cli
# now play with tab
Links
Config
Collaterals
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.