diff --git a/schema/go.mod b/schema/go.mod index 054862393ff8..60e8f460af26 100644 --- a/schema/go.mod +++ b/schema/go.mod @@ -1,7 +1,7 @@ module cosmossdk.io/schema -// NOTE: this go.mod should have zero dependencies and remain on go 1.12 to stay compatible +// NOTE: this go.mod should have zero dependencies and remain on go 1.22 to stay compatible // with all known production releases of the Cosmos SDK. This is to ensure that all historical // apps could be patched to support indexing if desired. -go 1.12 +go 1.22.2 diff --git a/schema/kind.go b/schema/kind.go index c3fefad52c8a..94d3934f5090 100644 --- a/schema/kind.go +++ b/schema/kind.go @@ -87,8 +87,8 @@ const ( JSONKind ) -// MAX_VALID_KIND is the maximum valid kind value. -const MAX_VALID_KIND = JSONKind +// MaxValidKind is the maximum valid kind value. +const MaxValidKind = JSONKind const ( // IntegerFormat is a regex that describes the format integer number strings must match. It specifies diff --git a/schema/kind_test.go b/schema/kind_test.go index 49799fe4956c..560769b75809 100644 --- a/schema/kind_test.go +++ b/schema/kind_test.go @@ -8,7 +8,7 @@ import ( ) func TestKind_Validate(t *testing.T) { - for kind := InvalidKind + 1; kind <= MAX_VALID_KIND; kind++ { + for kind := InvalidKind + 1; kind <= MaxValidKind; kind++ { if err := kind.Validate(); err != nil { t.Errorf("expected valid kind %s to pass validation, got: %v", kind, err) } @@ -92,7 +92,7 @@ func TestKind_ValidateValueType(t *testing.T) { } // nils get rejected - for kind := InvalidKind + 1; kind <= MAX_VALID_KIND; kind++ { + for kind := InvalidKind + 1; kind <= MaxValidKind; kind++ { if err := kind.ValidateValueType(nil); err == nil { t.Errorf("expected nil value to fail validation for kind %s", kind) }