Skip to content

Commit c7a31a1

Browse files
authored
Merge pull request #3 from fastbill/upgrade-go113
Upgrade to Go 1.13
2 parents aaee1b4 + a59804f commit c7a31a1

9 files changed

+34
-75
lines changed

.golangci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ issues:
1919
- dupl
2020
- goconst
2121
- gosec
22+
23+
linters-settings:
24+
gocyclo:
25+
min-complexity: 10

.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
language: go
22

33
go:
4-
- 1.11.x
4+
- 1.13.x
55

66
install:
7-
- go get -u github.com/golang/dep/cmd/dep
8-
- dep ensure
9-
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
7+
- go mod vendor
8+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.19.1
109

1110
script:
1211
- go test -race -cover ./...

Gopkg.lock

-53
This file was deleted.

Gopkg.toml

-14
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If the request could be made but the response status code was not `2xx` an error
88

99
## Example
1010
```go
11-
import "github.com/fastbill/go-request"
11+
import "github.com/fastbill/go-request/v2"
1212

1313
type Input struct {
1414
RequestValue string `json:"requestValue"`
@@ -104,4 +104,4 @@ defer func() {
104104
result := &Output{}
105105
err = json.NewDecoder(res.Body).Decode(result)
106106
```
107-
This shows the request package saves a lot of boilerplate code. instead of around 35 lines we just write the 9 lines shown in the example. That way the code is much easier to read and maintain.
107+
This shows the request package saves a lot of boilerplate code. instead of around 35 lines we just write the 9 lines shown in the example. That way the code is much easier to read and maintain.

go.mod

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module github.com/fastbill/go-request/v2
2+
3+
go 1.13
4+
5+
require (
6+
github.com/davecgh/go-spew v1.1.1 // indirect
7+
github.com/fastbill/go-httperrors/v2 v2.0.0
8+
github.com/pkg/errors v0.8.1
9+
github.com/stretchr/testify v1.3.0
10+
)

go.sum

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4+
github.com/fastbill/go-httperrors/v2 v2.0.0 h1:kjfmGJkl2JFMXwxBrkWbldB1ctFIPISHTGBTaTBL/V0=
5+
github.com/fastbill/go-httperrors/v2 v2.0.0/go.mod h1:0Jg7Xs67H09XjGpyQndBYTaOTGfyALE0YNVBgW7iy+8=
6+
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
7+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
9+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
10+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
11+
github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
12+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
13+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

request.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/http"
99
"time"
1010

11-
"github.com/fastbill/go-httperrors"
11+
"github.com/fastbill/go-httperrors/v2"
1212
"github.com/pkg/errors"
1313
)
1414

request_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010
"time"
1111

12-
"github.com/fastbill/go-httperrors"
12+
"github.com/fastbill/go-httperrors/v2"
1313
"github.com/stretchr/testify/assert"
1414
)
1515

0 commit comments

Comments
 (0)