Skip to content

Commit f567168

Browse files
authored
Fix warnings produced by staticcheck (#231)
I just ran [staticcheck.io](https://staticcheck.io) over the repository and these came up.
1 parent e6a62f3 commit f567168

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/src/extensions_publish.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Notes:
5656

5757
manifest, err := ioutil.ReadFile(*manifestFlag)
5858
if err != nil {
59-
return fmt.Errorf("%s\n\nRun this command in a directory with a %s file for an extension.\n\nSee 'src extensions %s -h' for help.", err, *manifestFlag, flagSet.Name())
59+
return fmt.Errorf("%s\n\nRun this command in a directory with a %s file for an extension.\n\nSee 'src extensions %s -h' for help", err, *manifestFlag, flagSet.Name())
6060
}
6161
extensionID := *extensionIDFlag
6262
if extensionID == "" {

internal/campaigns/logger.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func (w *progressWriter) Write(data []byte) (int, error) {
346346
}
347347
bar += strings.Repeat(" ", maxLength-len(bar))
348348
progessText := fmt.Sprintf("[%s] Steps: %d/%d (%s, %s)", bar, w.p.StepsComplete(), w.p.TotalSteps(), boldRed.Sprintf("%d failed", w.p.TotalStepsFailed()), hiGreen.Sprintf("%d patches", w.p.PatchCount()))
349-
fmt.Fprintf(w.w, progessText)
349+
fmt.Fprint(w.w, progessText)
350350
w.shouldClear = true
351351
w.progressLogLength = len(progessText)
352352
return n, err
@@ -366,7 +366,7 @@ func (w *progressWriter) clear() {
366366
if !w.shouldClear {
367367
return
368368
}
369-
fmt.Fprintf(w.w, "\r")
370-
fmt.Fprintf(w.w, strings.Repeat(" ", w.progressLogLength))
371-
fmt.Fprintf(w.w, "\r")
369+
fmt.Fprint(w.w, "\r")
370+
fmt.Fprint(w.w, strings.Repeat(" ", w.progressLogLength))
371+
fmt.Fprint(w.w, "\r")
372372
}

0 commit comments

Comments
 (0)