Skip to content

Commit

Permalink
I apparently forgot how flag works
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Akins committed Mar 2, 2017
1 parent 5a7b662 commit 474d14c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ func (r result) emit(rc int, message string) {
func main() {
parent := flag.String("parent", "rpool/k8s/volumes", "parent dataset for volumes")
flag.Parse()
if len(os.Args) > 1 {

args := flag.Args()

if len(args) == 0 {
usage()
}

_, action, args := os.Args[0], os.Args[1], os.Args[2:]
action := args[0]
args = args[1:]

switch action {
case "init":
Expand Down

0 comments on commit 474d14c

Please sign in to comment.