-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcli.go
31 lines (25 loc) · 908 Bytes
/
cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main
import (
"github.com/docopt/docopt-go"
)
func cli() map[string]interface{} {
usage := `r10k-go
Usage:
r10k-go puppetfile install [--moduledir=<PATH>] [--no-deps] [--puppetfile=<PUPPETFILE>] [--workers=<n>]
r10k-go puppetfile check [--puppetfile=<PUPPETFILE>]
r10k-go deploy environment <env>... [--workers=<n>]
r10k-go deploy module <module>... [--environment=<env>] [--workers=<n>]
r10k-go version
r10k-go -h | --help
r10k-go --version
Options:
-h --help Show this screen.
--modulesdir=<PATH> Path to the modules folder
--no-deps Skip downloading modules dependencies
--puppetFile=<PUPPETFILE> Path to the modules folder
--version Displays the version.
--workers=<n> Number of modules to download in parallel
`
opts, _ := docopt.Parse(usage, nil, true, "0.1", false)
return opts
}