mirror of https://github.com/nmasse-itix/liche.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
474 B
26 lines
474 B
package main
|
|
|
|
import "github.com/docopt/docopt-go"
|
|
|
|
const usage = `Link checker for Markdown and HTML
|
|
|
|
Usage:
|
|
linkcheck [-v] <filenames>...
|
|
|
|
Options:
|
|
-v, --verbose Be verbose`
|
|
|
|
type arguments struct {
|
|
filenames []string
|
|
verbose bool
|
|
}
|
|
|
|
func getArgs() (arguments, error) {
|
|
args, err := docopt.Parse(usage, nil, true, "linkcheck", true)
|
|
|
|
if err != nil {
|
|
return arguments{}, err
|
|
}
|
|
|
|
return arguments{args["<filenames>"].([]string), args["--verbose"].(bool)}, nil
|
|
}
|
|
|