Fix linting errors and pin linter version in release action

pull/817/head
max furman 2 years ago
parent d384b534c7
commit 62690ab52e

@ -33,7 +33,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: 'latest'
version: 'v1.44.0'
# Optional: working directory, useful for monorepos
# working-directory: somedir

@ -33,7 +33,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: 'v1.43.0'
version: 'v1.44.0'
# Optional: working directory, useful for monorepos
# working-directory: somedir

@ -57,7 +57,7 @@ func (m sshTestCertModifier) Modify(cert *ssh.Certificate, opts provisioner.Sign
if m == "" {
return nil
}
return fmt.Errorf(string(m))
return errors.New(string(m))
}
type sshTestCertValidator string
@ -66,7 +66,7 @@ func (v sshTestCertValidator) Valid(crt *ssh.Certificate, opts provisioner.SignS
if v == "" {
return nil
}
return fmt.Errorf(string(v))
return errors.New(string(v))
}
type sshTestOptionsValidator string
@ -75,7 +75,7 @@ func (v sshTestOptionsValidator) Valid(opts provisioner.SignSSHOptions) error {
if v == "" {
return nil
}
return fmt.Errorf(string(v))
return errors.New(string(v))
}
type sshTestOptionsModifier string
@ -84,7 +84,7 @@ func (m sshTestOptionsModifier) Modify(cert *ssh.Certificate, opts provisioner.S
if m == "" {
return nil
}
return fmt.Errorf(string(m))
return errors.New(string(m))
}
func TestAuthority_initHostOnly(t *testing.T) {

@ -142,7 +142,7 @@ func (e *Error) UnmarshalJSON(data []byte) error {
return err
}
e.Status = er.Status
e.Err = fmt.Errorf(er.Message)
e.Err = errors.New(er.Message)
return nil
}

Loading…
Cancel
Save