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

chore: upgrade to Go 1.20 #72

Merged
merged 28 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
852719d
feat: added IsValidVertex method
mojixcoder Aug 12, 2024
10feb9a
docs: added IsValidVertex to readme
mojixcoder Aug 12, 2024
a4c797d
fix: fix loop variable res captured by func literal error
mojixcoder Aug 12, 2024
2e5075f
feat: add cell to vertex function
mojixcoder Aug 17, 2024
011422a
feat: added cell to vertexes function
mojixcoder Aug 17, 2024
04a1868
test: improve tests for cell to vertex function
mojixcoder Aug 17, 2024
4b62928
feat: added vertex to lat lng method
mojixcoder Aug 17, 2024
d5c086e
fix: added t.Parallel() for subtests
mojixcoder Aug 17, 2024
d488fcd
fix: fix lint issues
mojixcoder Aug 17, 2024
78b8a47
fix: fix lint issues
mojixcoder Aug 17, 2024
fb31b10
fix: fix lint issues
mojixcoder Aug 17, 2024
2652826
Merge branch 'uber:master' into master
mojixcoder Aug 26, 2024
94d70d9
chore: upgrade to go 1.22
mojixcoder Aug 26, 2024
5aefadd
docs: fix typo
mojixcoder Aug 26, 2024
c06d43a
fix: revert to go 1.21
mojixcoder Aug 26, 2024
c889190
fix: revert to go 1.20
mojixcoder Aug 26, 2024
f30bae6
feat: support 3 latest go versions
mojixcoder Aug 26, 2024
6222bb9
chore: bump golangci version to its current latest version
mojixcoder Aug 28, 2024
9325bbd
fix: fix lint errors
mojixcoder Aug 28, 2024
c8c13a2
fix: skip gosec lint errors for IndexFromString method
mojixcoder Aug 28, 2024
299f112
fix: remove inadtivated linters
mojixcoder Aug 28, 2024
0e2b009
fix: fix depguard issues
mojixcoder Aug 28, 2024
f7416d2
fix: fix depguard issues
mojixcoder Aug 28, 2024
dc8b31a
fix: fix nolintlint issues
mojixcoder Aug 28, 2024
ab0b684
fix: fix warn linter logs
mojixcoder Aug 28, 2024
cd633c5
fix: enable all govet analyzers which includes shadow as well
mojixcoder Aug 28, 2024
846ecb6
style: fix typo
mojixcoder Aug 28, 2024
e29ad14
chore: bump version of github action packages
mojixcoder Aug 29, 2024
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
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.20"]

steps:
- uses: actions/setup-go@v3
Expand All @@ -21,14 +21,17 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.47.3
version: v1.60.3

test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.18", "1.19"]
go-version:
- "1.20"
- "1.21"
- "1.22"

steps:
- uses: actions/setup-go@v3
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ linters-settings:
allow-assign-and-anything: true
allow-cuddle-declarations: true
allow-assign-and-call: true
main:
allow:
- "github.com/uber/h3-go/v4"

linters:
disable-all: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func ExampleLatLngToCell() {
| `originToDirectedEdges` | `Cell#DirectedEdges` |
| `directedEdgeToBoundary` | `DirectedEdge#Boundary` |
| `cellToVertex` | `CellToVertex` |
| `cellToVertexes` | `cellToVertexes` |
| `cellToVertexes` | `CellToVertexes` |
| `vertexToLatLng` | `VertexToLatLng` |
| `isValidVertex` | `IsValidVertex` |
| `gridDistance` | `GridDistance`, `Cell#GridDistance` |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/uber/h3-go/v4

go 1.18
go 1.20
6 changes: 6 additions & 0 deletions h3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,10 @@ func TestPentagons(t *testing.T) {
res := res
t.Run(fmt.Sprintf("res=%d", res), func(t *testing.T) {
t.Parallel()

pentagons := Pentagons(res)
assertEqual(t, 12, len(pentagons))

for _, pentagon := range pentagons {
assertTrue(t, pentagon.IsPentagon())
assertEqual(t, res, pentagon.Resolution())
Expand Down Expand Up @@ -737,6 +739,7 @@ func assertEqual[T comparable](t *testing.T, expected, actual T, msgAndArgs ...i
expStr = fmt.Sprintf("%v", e)
actStr = fmt.Sprintf("%v", a)
}

t.Errorf("%v != %v", expStr, actStr)
logMsgAndArgs(t, msgAndArgs...)
}
Expand Down Expand Up @@ -779,6 +782,7 @@ func assertEqualLatLngs(t *testing.T, expected, actual []LatLng, msgAndArgs ...i

t.Errorf("LatLngs[%d]: (%s, %s)", i, latStr, lngStr)
logMsgAndArgs(t, msgAndArgs...)

count++

if count > 10 {
Expand Down Expand Up @@ -808,6 +812,7 @@ func assertEqualCells(t *testing.T, expected, actual []Cell, msgAndArgs ...inter
if c != actual[i] {
t.Errorf("Cells[%d]: %v != %v", i, c, actual[i])
logMsgAndArgs(t, msgAndArgs...)

count++

if count > 10 {
Expand Down Expand Up @@ -863,6 +868,7 @@ func assertEqualDisks(t *testing.T, expected, actual []Cell) {
for i, cell := range expected {
if cell != actual[i] {
t.Errorf("cell[%d]: %v != %v", i, cell, actual[i])

count++

if count > 5 {
Expand Down
Loading