Skip to content

Commit

Permalink
- Adding helper method to parse the incoming flags array into map
Browse files Browse the repository at this point in the history
  • Loading branch information
matang28 committed May 7, 2019
1 parent 880dd45 commit 09c8d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/business/git_project_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ import (
type MyData struct {
PackageName string
Args []string
Flags map[string]string
}
func main() {
// flags sent by packman's driver will be forwarded to here:
flags := ParseFlags(os.Args[2:])
// Build your own model to represent the templating you need
model := MyData{PackageName: "my_pkg", Args: args}
model := MyData{PackageName: "my_pkg", Flags: flags}
// Reply to packman's driver:
pm.Reply(model)
Expand Down

0 comments on commit 09c8d5a

Please sign in to comment.