Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update support Go version #41

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,21 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
version: v1.49.0
test:
name: Test
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
strategy:
matrix:
go: [ '1.16.x', '1.17.x', '1.18.x' ]
go: [ '1.18.x', '1.19.x' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: go test -race -covermode=atomic -coverprofile=coverage.txt ./...
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## Install

```shell
$ go get -u github.com/osamingo/indigo
$ go get github.com/osamingo/indigo@latest
```

## Usage
Expand Down Expand Up @@ -67,14 +67,14 @@ func main() {
## Benchmark

```
# Machine: MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
# CPU : 2.7 GHz Intel Core i7
# Memory : 16 GB 2133 MHz LPDDR3
# Machine: MacBook Pro (14-inch, 2021)
# CPU : Apple M1 Pro
# Memory : 32 GB

goos: darwin
goarch: amd64
goarch: arm64
pkg: github.com/osamingo/indigo
BenchmarkGenerator_NextID-8 30136 39099 ns/op 7 B/op 1 allocs/op
BenchmarkGenerator_NextID-10 30079 39191 ns/op 7 B/op 1 allocs/op
PASS
```

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/osamingo/indigo

go 1.15
go 1.18

require (
github.com/osamingo/base58 v1.0.0
github.com/sony/sonyflake v1.0.1-0.20200827011719-848d664ceea4
github.com/sony/sonyflake v1.1.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/osamingo/base58 v1.0.0 h1:NhsHxeyMRaD5Li67LgdZG+4/rlyaNr9rVqYQxNGLOYg=
github.com/osamingo/base58 v1.0.0/go.mod h1:nADsGCd4fm122SrLUaut+PhzCVwyvchAgxxBVDS5Wf8=
github.com/sony/sonyflake v1.0.1-0.20200827011719-848d664ceea4 h1:KPf4aWX4JGEdMICunm9A0YTFbD6OL23G14BR7cL/0wg=
github.com/sony/sonyflake v1.0.1-0.20200827011719-848d664ceea4/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y=
github.com/sony/sonyflake v1.1.0 h1:wnrEcL3aOkWmPlhScLEGAXKkLAIslnBteNUq4Bw6MM4=
github.com/sony/sonyflake v1.1.0/go.mod h1:LORtCywH/cq10ZbyfhKrHYgAUGH7mOBa76enV9txy/Y=
2 changes: 1 addition & 1 deletion indigo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func BenchmarkGenerator_NextID(b *testing.B) {
}
}

func ExampleGenerator_NextID() {
func ExampleGenerator_NextID() { //nolint: nosnakecase
const machineID = 65535

g := indigo.New(
Expand Down