diff options
| author | Christoph Blecker <admin@toph.ca> | 2017-09-25 12:36:24 -0700 |
|---|---|---|
| committer | Christoph Blecker <admin@toph.ca> | 2017-09-25 12:36:24 -0700 |
| commit | 3047fbcab22299f4575e1adf09f6dc9f31d62ea7 (patch) | |
| tree | 98f7217732abe525c2ad33bfe23caeda0cb1fad5 /generator/app.go | |
| parent | dcc58b928c3eff09edddf931b1d6b47464e770ff (diff) | |
Update generator to use WHAT variable
Diffstat (limited to 'generator/app.go')
| -rw-r--r-- | generator/app.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generator/app.go b/generator/app.go index 99336c0d..b44eadcd 100644 --- a/generator/app.go +++ b/generator/app.go @@ -200,14 +200,14 @@ func writeCustomContentBlock(f *os.File, content string) { func createGroupReadme(groups []Group, prefix string) error { // figure out if the user wants to generate one group var selectedGroupName *string - if envVal, ok := os.LookupEnv(strings.ToUpper(prefix)); ok { + if envVal, ok := os.LookupEnv("WHAT"); ok { selectedGroupName = &envVal } for _, group := range groups { group.Dir = group.DirName(prefix) // skip generation if the user specified only one group - if selectedGroupName != nil && *selectedGroupName != group.Dir { + if selectedGroupName != nil && strings.HasSuffix(group.Dir, *selectedGroupName) == false { fmt.Printf("Skipping %s/README.md\n", group.Dir) continue } |
