Skip to content

Commit

Permalink
Upgrade to go 1.21 (#22)
Browse files Browse the repository at this point in the history
* Upgrade to go 1.21

* Add codecov token

* Satisfy linter

* Fix warnings

* cleanup
  • Loading branch information
jasonpaulos authored May 9, 2024
1 parent 197c0d3 commit 6c77757
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

Expand All @@ -26,6 +26,8 @@ jobs:

- name: Upload code coverage
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
files: coverage.out
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.41.1
version: v1.58.0
- name: golangci-lint warnings
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.41.1
version: v1.58.0
# Optional: golangci-lint command line arguments.
args: -c .golangci-warnings.yml
3 changes: 0 additions & 3 deletions .golangci-warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ linters:
disable-all: true
enable:
- staticcheck
- structcheck
- typecheck
- varcheck
- deadcode
- gosimple
- unused

Expand Down
3 changes: 1 addition & 2 deletions abi/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Package abi provides an implementation of the Algorand ARC-4 ABI type system.
See https://arc.algorand.foundation/ARCs/arc-0004 for the corresponding specification.
Basic Operations
# Basic Operations
This package can parse ABI type names using the `abi.TypeOf()` function.
Expand Down
1 change: 1 addition & 0 deletions abi/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ type segment struct{ left, right int }
// Each sub-string represents a content type of the tuple type.
// The argument str is the content between parentheses of tuple, i.e.
// (...... str ......)
//
// ^ ^
func parseTupleContent(str string) ([]string, error) {
// if the tuple type content is empty (which is also allowed)
Expand Down
2 changes: 0 additions & 2 deletions abi/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"strconv"
"strings"
"testing"
"time"

"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -564,7 +563,6 @@ func generateTupleType(baseTypes []Type, tupleTypes []Type) Type {

func TestTypeMISC(t *testing.T) {
t.Parallel()
rand.Seed(time.Now().Unix())

var testpool = []Type{
boolType,
Expand Down
4 changes: 4 additions & 0 deletions address/address.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
Package address provides the ability to convert between 32 byte Algorand addresses and their base32
string form.
*/
package address

import (
Expand Down
3 changes: 3 additions & 0 deletions apps/box.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*
Package apps provides parsing utilities related to application arguments and box keys.
*/
package apps

import (
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/algorand/avm-abi

go 1.20
go 1.21

toolchain go1.21.10

require (
github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e
Expand Down

0 comments on commit 6c77757

Please sign in to comment.