Skip to content

Commit 9654520

Browse files
committed
IND-2525 workflow updated with linting, .go-version file added
1 parent 19bb39b commit 9654520

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.github/workflows/go-multierror.yml

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ jobs:
2727
exit 1
2828
fi
2929
30+
lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
35+
- name: Setup go
36+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
37+
with:
38+
go-version-file: go.mod
39+
- name: Run golangci-lint
40+
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5
41+
3042
linux-tests:
3143
runs-on: ubuntu-latest
3244
env:

.go-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.13

go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
module github.com/hashicorp/go-multierror
22

33
go 1.13
4-
5-
require github.com/hashicorp/errwrap v1.1.0

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
2-
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=

prefix.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ package multierror
55

66
import (
77
"fmt"
8-
9-
"github.com/hashicorp/errwrap"
108
)
119

1210
// Prefix is a helper function that will prefix some text
@@ -30,11 +28,11 @@ func Prefix(err error, prefix string) error {
3028

3129
// Wrap each of the errors
3230
for i, e := range err.Errors {
33-
err.Errors[i] = errwrap.Wrapf(format, e)
31+
err.Errors[i] = fmt.Errorf(format, e)
3432
}
3533

3634
return err
3735
default:
38-
return errwrap.Wrapf(format, err)
36+
return fmt.Errorf(format, err)
3937
}
4038
}

0 commit comments

Comments
 (0)