Last active
October 14, 2016 22:28
-
-
Save nicklaw5/7f766323acdf4a1472eb3b6d25adc9fd to your computer and use it in GitHub Desktop.
Go question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file exists in go-ku/flag/flag.go | |
package flag | |
import "flag" | |
// Flagset inherits the default FlagSet | |
type Flagset struct { | |
*flag.FlagSet | |
} | |
// Parse overrides the default Parse() function | |
func (f *Flagset) Parse() { | |
f.Parse() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file exists in go-ku/main.go | |
package main | |
import "github.com/nicklaw5/go-ku/flag" | |
var configFilePath = flag.String("config", "config/conf.toml", "The file path to the config file, realive to the project root.") | |
func main() { | |
flag.Parse() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment