gf: Index | Files

package cmdenv

import ""

Package cmdenv provides access to certain variable for both command options and environment.


Package Files


func Get Uses

func Get(key string, def ...interface{}) *gvar.Var

Get returns the command line argument of the specified <key>. If the argument does not exist, then it returns the environment variable with specified <key>. It returns the default value <def> if none of them exists.

Fetching Rules: 1. Command line arguments are in lowercase format, eg: gf.<package name>.<variable name>; 2. Environment arguments are in uppercase format, eg: GF_<package name>_<variable name>;

Package cmdenv imports 4 packages (graph) and is imported by 10 packages. Updated 2019-07-12. Refresh now. Tools for package owners.