Skip to content

Commit 011c134

Browse files
author
vilmibm
committed
linter appeasement
1 parent 97ff5e0 commit 011c134

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

pkg/cmd/actions/actions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func NewCmdActions(f *cmdutil.Factory) *cobra.Command {
3232

3333
func actionsRun(opts ActionsOptions) {
3434
cs := opts.IO.ColorScheme()
35-
fmt.Fprint(opts.IO.Out, fmt.Sprintf(heredoc.Doc(`
35+
fmt.Fprint(opts.IO.Out, heredoc.Docf(`
3636
Welcome to GitHub Actions on the command line.
3737
3838
%s
@@ -49,7 +49,7 @@ func actionsRun(opts ActionsOptions) {
4949
%s
5050
gh job view: View details for a given job
5151
gh job run: Run a given job within a workflow
52-
`),
52+
`,
5353
cs.Bold("Working with workflows"),
5454
cs.Bold("Working with runs"),
5555
cs.Bold("Working with jobs within runs")))

pkg/cmd/job/view/view.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func runView(opts *ViewOptions) error {
115115
opts.IO.StopProgressIndicator()
116116
}
117117

118+
// TODO if only one job in run, don't bother prompting just select it
118119
jobID, err = promptForJob(*opts, client, repo, *run)
119120
if err != nil {
120121
// TODO error handle
@@ -146,7 +147,7 @@ func runView(opts *ViewOptions) error {
146147
if n <= 0 {
147148
break
148149
}
149-
fmt.Fprintf(out, string(buff[0:n]))
150+
fmt.Fprint(out, string(buff[0:n]))
150151
if err != nil {
151152
break
152153
}

pkg/cmd/run/list/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func listRun(opts *ListOptions) error {
124124

125125
if opts.PlainOutput {
126126
elapsed := run.UpdatedAt.Sub(run.CreatedAt)
127-
tp.AddField(fmt.Sprintf("%s", elapsed), nil, nil)
127+
tp.AddField(elapsed.String(), nil, nil)
128128
}
129129

130130
tp.AddField(fmt.Sprintf("%d", run.ID), nil, cs.Cyan)

pkg/cmd/run/view/view.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ func runView(opts *ViewOptions) error {
115115
if annotationErr != nil {
116116
break
117117
}
118-
119-
for _, a := range as {
120-
annotations = append(annotations, a)
121-
}
118+
annotations = append(annotations, as...)
122119
}
123120

124121
if annotationErr != nil {

0 commit comments

Comments
 (0)