Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
GO_VER: 1.25.7
GO_VER: 1.26.0
GINKGO_VER: 2.27.3

jobs:
Expand Down Expand Up @@ -54,9 +54,9 @@ jobs:
go-version: ${{ env.GO_VER }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
uses: golangci/golangci-lint-action@v9
with:
version: v2.5.0
version: v2.9.0
skip-cache: true
problem-matchers: true

Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "2"
run:
concurrency: 4
go: "1.25"
go: "1.26"
tests: false
linters:
default: none
Expand Down Expand Up @@ -56,6 +56,7 @@ linters:
- unparam
- usestdlibvars
- whitespace
- modernize
settings:
gosec:
excludes:
Expand Down
6 changes: 4 additions & 2 deletions core/cachestub/batch_cache_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ func (bs *BatchCacheStub) makeKeyByte(
chaincodeName string,
args [][]byte,
) string {
keys := []string{channel, chaincodeName}
keys := make([]string, 0, 2+len(args))
keys = append(keys, channel, chaincodeName)
for _, arg := range args {
keys = append(keys, string(arg))
}
Expand All @@ -243,7 +244,8 @@ func (bs *BatchCacheStub) makeKeyString(
chaincodeName string,
args []string,
) string {
keys := []string{channel, chaincodeName}
keys := make([]string, 0, 2+len(args))
keys = append(keys, channel, chaincodeName)
keys = append(keys, args...)
return strings.Join(keys, "")
}
7 changes: 4 additions & 3 deletions core/routing/reflect/reflect_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
// containing the names of all methods that are defined on its type. This function only considers
// exported methods (those starting with an uppercase letter) due to Go's visibility rules in reflection.
func Methods(v any) []string {
methodNames := make([]string, 0)

t := reflect.TypeOf(v)
methodNames := make([]string, 0, t.NumMethod())

for i := range t.NumMethod() {
method := t.Method(i)
methodNames = append(methodNames, method.Name)
Expand Down Expand Up @@ -86,5 +86,6 @@ func MethodReturnsError(v any, method string) bool {
return false
}

return methodType.Out(numOut-1) == reflect.TypeOf((*error)(nil)).Elem()
// TODO: when i install version 1.26 everywhere, remove nolint
return methodType.Out(numOut-1) == reflect.TypeOf((*error)(nil)).Elem() //nolint:modernize
}
2 changes: 1 addition & 1 deletion fixture/gost/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module gost

go 1.25.7
go 1.26.0

require github.com/ddulesov/gogost v1.0.0
2 changes: 1 addition & 1 deletion mocks/grpc/mock_client_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (m *MockClientConn) SetCaller(user *mocks.UserFoundation) *MockClientConn {
}

// Invoke performs a unary RPC and returns after the response is received into reply.
func (m *MockClientConn) Invoke(_ context.Context, method string, args interface{}, reply interface{}, _ ...grpc.CallOption) error {
func (m *MockClientConn) Invoke(_ context.Context, method string, args any, reply any, _ ...grpc.CallOption) error {
if m.user == nil {
return errors.New("caller not set")
}
Expand Down
2 changes: 1 addition & 1 deletion mocks/multisigned_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewUserFoundationMultisigned(keyType pbfound.KeyType, n int) (*UserFoundati
})

hashedAddr := sha3.Sum256(bytes.Join(binPubKeys, []byte("")))
userMultisigned.AddressBase58Check = base58.CheckEncode(hashedAddr[1:], hashedAddr[0])
userMultisigned.AddressBase58Check = base58.CheckEncode(hashedAddr[1:], hashedAddr[0]) //nolint:gosec
userMultisigned.AddressBytes = hashedAddr[:]
return userMultisigned, nil
}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/anoideaopen/foundation/test/integration

go 1.25.7
go 1.26.0

tool (
github.com/IBM/idemix/tools/idemixgen
Expand Down