Skip to content

Commit 2a722a6

Browse files
committed
use tabs to indent flags
1 parent 4d5add7 commit 2a722a6

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

mage/args_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ Usage:
480480
481481
Flags:
482482
483-
-greeting=<string> the message to append to the name
484-
-repeat=<int> the number of times to repeat
483+
-greeting=<string> the message to append to the name
484+
-repeat=<int> the number of times to repeat
485485
486486
`
487487
if actual != expected {
@@ -514,7 +514,7 @@ Usage:
514514
515515
Flags:
516516
517-
-greeting=<string> the greeting to use
517+
-greeting=<string> the greeting to use
518518
519519
`
520520
if actual != expected {

parse/parse.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,23 +195,23 @@ func (f Function) FlagDocsString() string {
195195
var entries []entry
196196
maxLen := 0
197197
for _, a := range opts {
198-
label := fmt.Sprintf(" -%s=<%s>", a.Name, a.Type)
198+
label := fmt.Sprintf("-%s=<%s>", a.Name, a.Type)
199199
if len(label) > maxLen {
200200
maxLen = len(label)
201201
}
202202
entries = append(entries, entry{label: label, comment: a.Comment})
203203
}
204204

205205
var buf strings.Builder
206-
buf.WriteString("Flags:\n\n")
206+
_, _ = buf.WriteString("Flags:\n\n")
207207
for _, e := range entries {
208208
if e.comment != "" {
209-
buf.WriteString(fmt.Sprintf("%-*s %s\n", maxLen, e.label, e.comment))
209+
_, _ = buf.WriteString(fmt.Sprintf("\t%-*s %s\n", maxLen, e.label, e.comment))
210210
} else {
211-
buf.WriteString(e.label + "\n")
211+
_, _ = buf.WriteString(fmt.Sprintf("\t%s\n", e.label))
212212
}
213213
}
214-
buf.WriteString("\n")
214+
_, _ = buf.WriteString("\n")
215215
return buf.String()
216216
}
217217

site/content/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Usage:
131131
mage deploy <env> [<flags>]
132132
133133
Flags:
134+
134135
-version=<string> git tag for the build, defaults to the next minor build if not set
135136
-dryrun=<bool> if set to true, just outputs the build artifacts
136137
```

0 commit comments

Comments
 (0)