Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RootCmd = &cobra.Command{ Use: "gmxcli", SilenceUsage: true, PersistentPreRunE: initGmx, }
RootCmd represents the base command when called without any subcommands
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by gmxcli.main(). It only needs to happen once to the rootCmd.
func UserCacheDir ¶
UserCacheDir returns the default root directory to use for user-specific cached data. Users should create their own application-specific subdirectory within this one and use that.
On Unix systems, it returns $XDG_CACHE_HOME as specified by https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it returns $HOME/Library/Caches. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache.
If the location cannot be determined (for example, $HOME is not defined), then it will return an error. TODO(diwaker): remove this in favor of os.UserCacheDir once go 1.11 is released