Skip to content

Commit

Permalink
Bump go version (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatthm authored Dec 13, 2023
1 parent 0b3f6a0 commit 33331e4
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
GO_VERSION: "1.20.x"
GO_VERSION: "1.21.x"

jobs:
lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:

env:
GO111MODULE: "on"
GO_LATEST_VERSION: "1.20.x"
GO_LATEST_VERSION: "1.21.x"

jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [ 1.18.x, 1.19.x, 1.20.x ]
go-version: [ 1.19.x, 1.20.x, 1.21.x ]
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ linters:
enable-all: true
disable:
- deadcode
- depguard
- exhaustivestruct
- exhaustruct
- forbidigo
Expand All @@ -40,6 +41,7 @@ linters:
- paralleltest
- scopelint
- structcheck
- testifylint
- testpackage
- varcheck
- varnamelen
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VENDOR_DIR = vendor

GOLANGCI_LINT_VERSION ?= v1.52.2
GOLANGCI_LINT_VERSION ?= v1.55.2

GO ?= go
GOLANGCI_LINT ?= $(shell go env GOPATH)/bin/golangci-lint-$(GOLANGCI_LINT_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

## Prerequisites

- `Go >= 1.17`
- `Go >= 1.19`

[<sub><sup>[table of contents]</sup></sub>](#table-of-contents)

Expand Down
4 changes: 2 additions & 2 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (

// DatabaseOption sets the database option.
type DatabaseOption interface {
applyDatabaseOption(*database)
applyDatabaseOption(d *database)
}

type databaseOptionFunc func(*database)
type databaseOptionFunc func(d *database)

func (f databaseOptionFunc) applyDatabaseOption(d *database) {
f(d)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/godogx/mongosteps

go 1.18
go 1.19

require (
github.com/cucumber/godog v0.13.0
Expand Down
4 changes: 2 additions & 2 deletions manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const defaultDatabase = "default"

// ManagerOption sets an option on the Manager.
type ManagerOption interface {
applyManagerOption(*Manager)
applyManagerOption(m *Manager)
}

type managerOptionFunc func(*Manager)
type managerOptionFunc func(m *Manager)

func (f managerOptionFunc) applyManagerOption(m *Manager) {
f(m)
Expand Down
32 changes: 0 additions & 32 deletions manager_inernal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ func TestManager_NoDocumentsInCollectionOfDatabase(t *testing.T) {

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -120,10 +116,6 @@ func TestManager_TheseDocumentsAreStoredInCollectionOfDatabase(t *testing.T) {

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -194,10 +186,6 @@ func TestManager_TheseDocumentsFromFileAreStoredInCollectionOfDatabase(t *testin

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -263,10 +251,6 @@ func TestManager_SearchInCollectionOfDatabase(t *testing.T) {

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -325,10 +309,6 @@ func TestManager_NoDocumentsAreAvailableInCollectionOfDatabase(t *testing.T) {

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -387,10 +367,6 @@ func TestManager_HaveNumberOfDocumentsAvailableInCollectionOfDatabase(t *testing

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -496,10 +472,6 @@ func TestManager_HaveOnlyTheseDocumentsAvailableInCollectionOfDatabase(t *testin

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down Expand Up @@ -587,10 +559,6 @@ func TestManager_HaveOnlyTheseDocumentsFromFileAvailableInCollectionOfDatabase(t

mt := mtest.New(t, mtest.NewOptions().ClientType(mtest.Mock))

mt.Cleanup(func() {
mt.Close()
})

mt.Run(tc.scenario, func(t *mtest.T) {
t.Parallel()

Expand Down

0 comments on commit 33331e4

Please sign in to comment.