Added example program, New() now requires application name, fixed -h and -help.

This commit is contained in:
pztrn committed 2018-12-18 04:02:01 +05:00
1 parent d02921ea77
commit ba5b52918e
3 files changed
+26 -5

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package main
import (
"gitlab.com/pztrn/flagger"
)
var f *flagger.Flagger
func main() {
f = flagger.New("testprogram", nil)
f.Initialize()
f.AddFlag(&flagger.Flag{
Name: "testflag",
Description: "Just a test flag",
Type: "bool",
DefaultValue: false,
})
f.Parse()
}