Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: Bold names, wrapped description
  • Loading branch information
mafredri committed Jun 10, 2022
commit 589f87d8fd84275aa9efbbaca512161bbd5d214a
6 changes: 5 additions & 1 deletion cli/templateinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ func templateInit() *cobra.Command {
exampleNames := []string{}
exampleByName := map[string]examples.Example{}
for _, example := range exampleList {
name := fmt.Sprintf("%s\n %s", example.Name, example.Description)
name := fmt.Sprintf(
"%s\n%s\n",
cliui.Styles.Bold.Render(example.Name),
cliui.Styles.Wrap.Copy().PaddingLeft(6).Render(example.Description),
)
exampleNames = append(exampleNames, name)
exampleByName[name] = example
}
Expand Down