parser

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 2 Imported by: 4

README

go-args-parser

GitHub release Go GitHub go.mod Go version of a Go module GoReportCard example GitHub license

환경변수나 인자로 전달받는 내용을 map[string]string 포맷으로 변경합니다.

Getting started

download
go get -v github.com/Sotaneum/go-args-parser
API
name params & returns info
Args map[string]string Argument로 넘어오는 값을 map[string]string 포맷으로 반환합니다.
EnvAll map[string]string 모든 환경 변수 값을 map[string]string 포맷으로 반환합니다.
Env map[string]string 환경 변수 값 중 params에 해당하는 key만 추출하여 map[string]string 포맷으로 반환합니다.
ArgsJoinEnv map[string]string params에 해당 하는 key만 추출하여 env로 부터 값을 가져오고 그 위에 Args를 덮어쓰기합니다.

LICENSE

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Args

func Args(options map[string]string) map[string]string

func ArgsJoinEnv

func ArgsJoinEnv(options map[string]string) map[string]string

func ArgsJoinEnvAll

func ArgsJoinEnvAll(options map[string]string) map[string]string

func Env

func Env(options map[string]string) map[string]string

func EnvAll

func EnvAll(options map[string]string) map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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