golangci-lint: enable mirror linter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -41,6 +41,7 @@ linters:
|
||||
- govet
|
||||
- importas # Enforces consistent import aliases.
|
||||
- ineffassign
|
||||
- mirror # Detects wrong mirror patterns of bytes/strings usage.
|
||||
- misspell # Detects commonly misspelled English words in comments.
|
||||
- nakedret # Detects uses of naked returns.
|
||||
- nilerr # Detects code that returns nil even if it checks that the error is not nil.
|
||||
|
||||
@ -69,7 +69,7 @@ func writeFile(data string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
_, err = tmpfile.Write([]byte(data))
|
||||
_, err = tmpfile.WriteString(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ func TestPluginSocketBackwardsCompatible(t *testing.T) {
|
||||
|
||||
ptmx, err := pty.Start(command)
|
||||
assert.NilError(t, err, "failed to launch command with fake TTY")
|
||||
_, _ = ptmx.Write([]byte("hello!"))
|
||||
_, _ = ptmx.WriteString("hello!")
|
||||
|
||||
done := make(chan error)
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user