README ¶ printev Features Read env var from go and ruby codes Output served on the sorted format NAME: printev - Generate env variable from given codes USAGE: main [global options] command [command options] [arguments...] VERSION: 1.0.1 DESCRIPTION: Go Env Printer COMMANDS: help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --source value, -s value [Optional] Target source code. (default: current dir) --mute, -m [Optional] Hide preview and log. (default: false) --write, -w [Optional] Write environment variables found. (default: false) --output value, -o value [Optional] Output location of generated env files, by default write to printev.sample (default: "printev.sample") --help, -h show help (default: false) --version, -v print the version (default: false) COPYRIGHT: Lumochift™ © 2020 Installation go get -u github.com/lumochift/printev/cmd/printev Sample run Source code example package main import ( "fmt" "os" ) func main() { fmt.Println(os.Getenv("TEST_ENV_1")) fmt.Println(os.Getenv("TEST_ENV_2")) } Output ➜ printev -s testdata List env variable: TEST_ENV_1 TEST_ENV_2 Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package printev provides functionality to get all env usage Index ¶ func FindEnv(path string) []string func GetEnv(b []byte, lang Lang) (records []string) func GetEnvStruct(b []byte) (records []string) type Lang Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func FindEnv ¶ func FindEnv(path string) []string FindEnv from path, currently get env from *.go files func GetEnv ¶ func GetEnv(b []byte, lang Lang) (records []string) GetEnv from given []bytes value func GetEnvStruct ¶ func GetEnvStruct(b []byte) (records []string) GetEnvStruct fetch env from tag struct Types ¶ type Lang ¶ type Lang byte Lang is type holder for programming language type const ( // Go programming language Go Lang = iota // Ruby programming language Ruby // Node Lang Node ) Source Files ¶ View all Source files printev.go Directories ¶ Show internal Expand all Path Synopsis cmd printev command Click to show internal directories. Click to hide internal directories.