Skip to content

Commit

Permalink
Raised min Go version to 1.16, bumped versions and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jan 11, 2022
1 parent 91b72b6 commit 2d047fd
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .github/mergify.yml
Expand Up @@ -8,7 +8,6 @@ pull_request_rules:
conditions:
- -draft
- author~=^dependabot(|-preview)\[bot\]$
- check-success='test (1.15.x, ubuntu-latest)'
- check-success='test (1.16.x, ubuntu-latest)'
- check-success='test (1.17.x, ubuntu-latest)'
- check-success='Analyze (go)'
Expand All @@ -22,7 +21,6 @@ pull_request_rules:
- name: Alert on major version detection
conditions:
- author~=^dependabot(|-preview)\[bot\]$
- check-success='test (1.15.x, ubuntu-latest)'
- check-success='test (1.16.x, ubuntu-latest)'
- check-success='test (1.17.x, ubuntu-latest)'
- check-success='Analyze (go)'
Expand All @@ -38,7 +36,6 @@ pull_request_rules:
- name: Automatic Merge ⬇️ on Approval ✔
conditions:
- "#approved-reviews-by>=1"
- check-success='test (1.15.x, ubuntu-latest)'
- check-success='test (1.16.x, ubuntu-latest)'
- check-success='test (1.17.x, ubuntu-latest)'
- check-success='Analyze (go)'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
test:
strategy:
matrix:
go-version: [ 1.15.x, 1.16.x, 1.17.x ]
go-version: [ 1.16.x, 1.17.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions .make/go.mk
Expand Up @@ -54,15 +54,15 @@ install-go: ## Install the application (Using Native Go)
lint: ## Run the golangci-lint application (install if not found)
@echo "installing golangci-lint..."
@#Travis (has sudo)
@if [ "$(shell command -v golangci-lint)" = "" ] && [ $(TRAVIS) ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.42.1 && sudo cp ./bin/golangci-lint $(go env GOPATH)/bin/; fi;
@if [ "$(shell command -v golangci-lint)" = "" ] && [ $(TRAVIS) ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.43.0 && sudo cp ./bin/golangci-lint $(go env GOPATH)/bin/; fi;
@#AWS CodePipeline
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(CODEBUILD_BUILD_ID)" != "" ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1; fi;
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(CODEBUILD_BUILD_ID)" != "" ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0; fi;
@#Github Actions
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(GITHUB_WORKFLOW)" != "" ]; then curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b $(go env GOPATH)/bin v1.42.1; fi;
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(GITHUB_WORKFLOW)" != "" ]; then curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b $(go env GOPATH)/bin v1.43.0; fi;
@#Brew - MacOS
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(shell command -v brew)" != "" ]; then brew install golangci-lint; fi;
@#MacOS Vanilla
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(shell command -v brew)" != "" ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- v1.42.1; fi;
@if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(shell command -v brew)" != "" ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- v1.43.0; fi;
@echo "running golangci-lint..."
@golangci-lint run --verbose

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -107,7 +107,7 @@ vet Run the Go vet application

## Examples & Tests
All unit tests and [examples](examples) run via [Github Actions](https://github.com/tonicpow/go-tonicpow/actions) and
uses [Go version 1.15.x](https://golang.org/doc/go1.15). View the [configuration file](.github/workflows/run-tests.yml).
uses [Go version 1.16.x](https://golang.org/doc/go1.16). View the [configuration file](.github/workflows/run-tests.yml).

#### View all [real working examples](examples).
- [Loading the Library](examples/new_client)
Expand Down Expand Up @@ -155,8 +155,8 @@ Checkout all the [real working examples](examples).

## Maintainers
| [<img src="https://github.com/mrz1836.png" height="50" alt="MrZ" />](https://github.com/mrz1836) | [<img src="https://github.com/rohenaz.png" height="50" alt="Satchmo" />](https://github.com/rohenaz) |
|:---:|:---:|
| [MrZ](https://github.com/mrz1836) | [Satchmo](https://github.com/rohenaz) |
|:------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------:|
| [MrZ](https://github.com/mrz1836) | [Satchmo](https://github.com/rohenaz) |

<br/>

Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Expand Up @@ -187,7 +187,7 @@ func ExampleNewClient() {
return
}
fmt.Printf("loaded client: %s", client.options.userAgent)
// Output:loaded client: go-tonicpow: v0.6.15
// Output:loaded client: go-tonicpow: v0.6.16
}

// BenchmarkNewClient benchmarks the method NewClient()
Expand Down
2 changes: 1 addition & 1 deletion definitions.go
Expand Up @@ -10,7 +10,7 @@ const (
defaultHTTPTimeout = 10 * time.Second // Default timeout for all GET requests in seconds
defaultRetryCount int = 2 // Default retry count for HTTP requests
defaultUserAgent = "go-tonicpow: " + version // Default user agent
version string = "v0.6.15" // go-tonicpow version
version string = "v0.6.16" // go-tonicpow version

// Field key names for various model requests
fieldAdvertiserProfileID = "advertiser_profile_id"
Expand Down
3 changes: 2 additions & 1 deletion go.mod
@@ -1,11 +1,12 @@
module github.com/tonicpow/go-tonicpow

go 1.15
go 1.16

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-resty/resty/v2 v2.7.0
github.com/jarcoal/httpmock v1.1.0
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20220111093109-d55c255bac03 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
3 changes: 2 additions & 1 deletion go.sum
Expand Up @@ -10,8 +10,9 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb h1:pirldcYWx7rx7kE5r+9WsOXPXK0+WH5+uZ7uPmJ44uM=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220111093109-d55c255bac03 h1:0FB83qp0AzVJm+0wcIlauAjJ+tNdh7jLuacRYCIVv7s=
golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
4 changes: 2 additions & 2 deletions tonicpow_test.go
Expand Up @@ -41,7 +41,7 @@ func TestVersion(t *testing.T) {
// See more examples in /examples/
func ExampleVersion() {
fmt.Printf("version: %s", Version())
// Output:version: v0.6.15
// Output:version: v0.6.16
}

// TestUserAgent will test the method UserAgent()
Expand All @@ -59,7 +59,7 @@ func TestUserAgent(t *testing.T) {
// See more examples in /examples/
func ExampleUserAgent() {
fmt.Printf("user agent: %s", UserAgent())
// Output:user agent: go-tonicpow: v0.6.15
// Output:user agent: go-tonicpow: v0.6.16
}

// TestGetFeedType will test the method GetFeedType()
Expand Down

0 comments on commit 2d047fd

Please sign in to comment.