applee / flag

Parse flags, environment variables and config files,inspired by https://github.com/namsral/flag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Usage

import "github.com/applee/flag"

var (
    config string
    age int
)

flag.StringVar(&config, flag.DefaultConfigFlagName, "", "path to config toml file")
flag.IntVar(&age, "age", 24, "help message for age")

log.Fatal(flag.Parse())

About

Parse flags, environment variables and config files,inspired by https://github.com/namsral/flag

License:MIT License


Languages

Language:Go 100.0%