Skip to content

Commit 09c8d5a

Browse files
committed
- Adding helper method to parse the incoming flags array into map
1 parent 880dd45 commit 09c8d5a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/business/git_project_init.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ import (
6363
6464
type MyData struct {
6565
PackageName string
66-
Args []string
66+
Flags map[string]string
6767
}
6868
6969
func main() {
7070
// flags sent by packman's driver will be forwarded to here:
7171
flags := ParseFlags(os.Args[2:])
7272
7373
// Build your own model to represent the templating you need
74-
model := MyData{PackageName: "my_pkg", Args: args}
74+
model := MyData{PackageName: "my_pkg", Flags: flags}
7575
7676
// Reply to packman's driver:
7777
pm.Reply(model)

0 commit comments

Comments
 (0)
⌂ 换网址