mirror of https://github.com/nmasse-itix/liche.git
2 changed files with 35 additions and 25 deletions
@ -0,0 +1,26 @@ |
|||
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 |
|||
} |
|||
Loading…
Reference in new issue