diff options
| author | Nikhita Raghunath <nikitaraghunath@gmail.com> | 2019-02-25 00:25:14 +0530 |
|---|---|---|
| committer | Nikhita Raghunath <nikitaraghunath@gmail.com> | 2019-02-26 04:08:40 +0530 |
| commit | 1816b3e406e1ce77a347a46d77b28e5618164d25 (patch) | |
| tree | bf9bd3ff62f1780d9c0298290ea0ca5b9729a313 /generator/app.go | |
| parent | 7efa0627cea7f654d459efccf07d0930f3289371 (diff) | |
Add support for User Groups in sigs.yaml
Diffstat (limited to 'generator/app.go')
| -rw-r--r-- | generator/app.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generator/app.go b/generator/app.go index da6b4a71..0b17b100 100644 --- a/generator/app.go +++ b/generator/app.go @@ -124,6 +124,7 @@ func (e *Group) DirName(prefix string) string { type Context struct { Sigs []Group WorkingGroups []Group + UserGroups []Group } func pathExists(path string) bool { @@ -305,6 +306,10 @@ func main() { return strings.ToLower(ctx.WorkingGroups[i].Name) <= strings.ToLower(ctx.WorkingGroups[j].Name) }) + sort.Slice(ctx.UserGroups, func(i, j int) bool { + return strings.ToLower(ctx.UserGroups[i].Name) <= strings.ToLower(ctx.UserGroups[j].Name) + }) + err = createGroupReadme(ctx.Sigs, "sig") if err != nil { log.Fatal(err) @@ -315,6 +320,11 @@ func main() { log.Fatal(err) } + err = createGroupReadme(ctx.UserGroups, "ug") + if err != nil { + log.Fatal(err) + } + fmt.Println("Generating sig-list.md") outputPath := filepath.Join(baseGeneratorDir, sigListOutput) err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, listTemplate), outputPath, "markdown", ctx) |
