21 lines
323 B
Go
21 lines
323 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"git.pyer.club/kingecg/command"
|
|
)
|
|
|
|
func main() {
|
|
type targs struct {
|
|
Test string `flag_default:"test" flag_usage:"this is test"`
|
|
TestBool bool `flag_short:"b"`
|
|
TestInt int
|
|
}
|
|
sargs := &targs{}
|
|
v, _ := command.NewFVSet(sargs)
|
|
v.Parse(os.Args[1:])
|
|
fmt.Println(sargs)
|
|
}
|