cmd

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func UserCacheDir() (string, error)

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

Types

type GMXConfig

type GMXConfig struct {
	Filters []gmail.Filter
}

GMXConfig captures configuration for gmxcli commands

type TokenMap

type TokenMap map[string]*oauth2.Token

TokenMap maps user IDs (typically email) to oauth tokens.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL