| 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | "os" |
| 6 | ) |
| 7 | |
| 8 | func main() { |
| 9 | if len(os.Args) < 2 { |
| 10 | usage() |
| 11 | os.Exit(1) |
| 12 | } |
| 13 | |
| 14 | switch os.Args[1] { |
| 15 | case "tags": |
| 16 | runTags(os.Args[2:]) |
| 17 | default: |
| 18 | usage() |
| 19 | os.Exit(1) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | func usage() { |
| 24 | fmt.Fprintf(os.Stderr, `Usage: clerk <command> [options] |
| 25 | |
| 26 | Commands: |
| 27 | tags Generate ctags-compatibletag file. |
| 28 | `) |
| 29 | } |