Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf589a2c

Browse files
committed
fix linting issues
1 parentf7cff22 commitf589a2c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

‎cmd/dstask/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ func main() {
166166
completions.Completions(conf,os.Args,ctx)
167167

168168
casedstask.CMD_PRINT_BASH_COMPLETION:
169-
fmt.Printf(completions.Bash)
169+
fmt.Print(completions.Bash)
170170

171171
casedstask.CMD_PRINT_ZSH_COMPLETION:
172-
fmt.Printf(completions.Zsh)
172+
fmt.Print(completions.Zsh)
173173

174174
casedstask.CMD_PRINT_FISH_COMPLETION:
175-
fmt.Printf(completions.Fish)
175+
fmt.Print(completions.Fish)
176176
default:
177177
panic("this should never happen?")
178178
}

‎table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func FixStr(text string, width int) string {
4444
text=strings.Split(text,"\n")[0]
4545
length:=width-runewidth.StringWidth(text)
4646
iflength>=0 {
47-
returnfmt.Sprintf("%s",text)+strings.Repeat(" ",length)
47+
returntext+strings.Repeat(" ",length)
4848
}
4949
returnrunewidth.Truncate(text,width," ")
5050
}

‎util_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package dstask
22

33
import (
4-
"io/ioutil"
54
"os"
65
"testing"
76

@@ -47,7 +46,7 @@ func TestMakeTempFilename(t *testing.T) {
4746

4847
assert.Equal(t,tc.expected,tf)
4948

50-
f,err:=ioutil.TempFile("",tf)
49+
f,err:=os.CreateTemp("",tf)
5150
assert.Nil(t,err)
5251
assert.Nil(t,f.Close())
5352
assert.Nil(t,os.Remove(f.Name()))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp