go-flag 0.1.0

Command line parser library, made to be compatible with Go's flag
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main

import (
	"flag"
	"fmt"
)

func main() {
	force := flag.Bool("f", false, "force")
	lines := flag.Int("lines", 10, "lines")
	flag.Parse()
	fmt.Printf("force = %v\n", *force)
	fmt.Printf("lines = %v\n", *lines)
	args := flag.Args()
	for _, arg := range args {
		fmt.Println(arg)
	}
}