Skip to content

Commit

Permalink
Fix linting errors and pin linter version in release action
Browse files Browse the repository at this point in the history
  • Loading branch information
dopey committed Feb 3, 2022
1 parent d384b53 commit 62690ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions authority/ssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion errs/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 62690ab

Please sign in to comment.