diff --git a/README.md b/README.md index c935c92..25b9c6c 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,9 @@ on your own for now. I'm working on this in my "free" time in the SIT ICT lab, so I don't have much time for documentation yet. I still need to do my labs after all. +``` +go get github.com/serverwentdown/cisco-ios-apply +apply -help +``` + diff --git a/main.go b/main.go index a25c344..ded14fe 100644 --- a/main.go +++ b/main.go @@ -35,19 +35,18 @@ import ( "time" ) -var Usage = func() { - fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [-port PORT] [-writefile] FILE...\n", os.Args[0]) - flag.PrintDefaults() -} - func main() { + flag.Usage = func() { + fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [-port PORT] [-writefile] FILE...\n", os.Args[0]) + flag.PrintDefaults() + } port := flag.String("port", "/dev/ttyUSB0", "Serial port to write to") writefile := flag.Bool("writefile", false, "Treat PORT as file, and write to file") flag.Parse() confs := flag.Args() if len(confs) < 1 { - Usage() + flag.Usage() return }