]> Cypherpunks repositories - keks.git/commitdiff
go fmt
authorSergey Matveev <stargrave@stargrave.org>
Tue, 21 Jan 2025 08:55:10 +0000 (11:55 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 10 Feb 2025 15:39:45 +0000 (18:39 +0300)
go/blob_test.go
go/generic_test.go
go/int_test.go
go/list_test.go
go/map_test.go
go/string_test.go
go/tai_test.go

index 18a61de87637391b9e0511ad90768be82721522d21f932886d568e69d2ee2a94..480f449f5d6f6b6cc7067f063c2836e8fb94d486e52a6bcbecf18868d92bda68 100644 (file)
@@ -127,7 +127,7 @@ func TestEmpty(t *testing.T) {
 }
 
 func TestBlobSymmetric(t *testing.T) {
-       f := func(ChunkLen uint8, ChunkNum uint8) bool {
+       f := func(ChunkLen, ChunkNum uint8) bool {
                if uint16(ChunkLen)*uint16(ChunkNum) > 2000 {
                        return true
                }
@@ -203,4 +203,4 @@ func TestBlobThrowsWhenWrongTerminatorTag(t *testing.T) {
        if err != ErrBlobBadAtom {
                t.Errorf("expected ErrBlobBadChunkLen, got %s", err)
        }
-}
\ No newline at end of file
+}
index 3b04b30d1906a21111193ba9819b40f216c7b09d692dbca486cd6f248147b01d..2b42815fd98641c326ef4d49c630d58320c07357ca4cf369d7c577ff297a1bea 100644 (file)
@@ -30,4 +30,4 @@ func TestLonelyEOC(t *testing.T) {
        if err != ErrUnexpectedEOC {
                t.Errorf("expected ErrUnexpectedEOC, got %v", err)
        }
-}
\ No newline at end of file
+}
index 104fe7aa76dd9bdd42c6d46c9640f32d3f03e27ba249e8aa367d32a98046dfc7..cba00c71d272e9bee531f81f23326e04ca15b4a1e5feeef2cbe2faf3a36ac70a 100644 (file)
@@ -245,6 +245,7 @@ func TestThrowsWhenNonBinInInt(t *testing.T) {
                t.Errorf("expected ErrBadInt, got %v", err)
        }
 }
+
 func TestTemp(t *testing.T) {
        object, suc := big.NewInt(1).SetString("-400000000000000000090009090909090909000000000000", 10)
        t.Log(object)
@@ -305,6 +306,7 @@ func TestUInt32Symmetric(t *testing.T) {
                t.Error(err)
        }
 }
+
 func TestUInt16Symmetric(t *testing.T) {
        f := func(x uint16) bool {
                encoded, err := EncodeBuf(x, nil)
@@ -333,6 +335,7 @@ func TestUInt16Symmetric(t *testing.T) {
                t.Error(err)
        }
 }
+
 func TestUInt8Symmetric(t *testing.T) {
        f := func(x uint8) bool {
                encoded, err := EncodeBuf(x, nil)
index e3755389051540ad0f75e1efb71cf04d740edcc6e72bc9c0301a254888f933b9..31f75f2184d8cea035691418f459f4cc4c1ab67b63e0774ad34d27a13edc5852 100644 (file)
@@ -58,7 +58,6 @@ func TestListIntSymmetric(t *testing.T) {
                }
                udecoded, success := decoded.([]any)
                if !success {
-
                        t.Errorf("failed to cast")
                }
                for i := range x {
index 724a35e732dd6150e18d82514eecfb3a4600af218956069d96eb5b93a145921f..409d56be659cb4af176cd37619aaf9afad9d7946f29e8d81bfdf9355f2c58ee2 100644 (file)
@@ -16,7 +16,6 @@ func TestEmptyMap(t *testing.T) {
        encoded, err := EncodeBuf(object, nil)
        if err != nil {
                t.Errorf("error during encode: %s", err)
-
        }
        if !bytes.Equal(encoded, hexstring) {
                t.Errorf("expected hexstring %s, got %s", hex.EncodeToString(hexstring), hex.EncodeToString(encoded))
index 72a18032109b8e413f264a088ce1bbba84cb8510b39bd2efc6c6392edca5885f..3d4c9da1b7635474c2a2fbcbc02bf0c1aa4f3822c4c23de490d68853f71a350e 100644 (file)
@@ -207,7 +207,7 @@ func RandStringBytes(n int) string {
 }
 
 func TestThrowsWhenStringTooLong(t *testing.T) {
-       f := func(x uint8, y uint8) bool {
+       f := func(x, y uint8) bool {
                if (y == x) || (y == 0) || (x == 0) {
                        return true
                }
index 5cbec3765276d3f28872dc6aa546d0b7151dab2ebae509886e67f53ce39d55bc..a548b9f057bcf7a58b6a0786f536ddb67059aab51e7fe6a9c365fd499096429b 100644 (file)
@@ -165,7 +165,7 @@ func Test20241120(t *testing.T) {
 }
 
 func TestTaiSymmetric(t *testing.T) {
-       f := func(a int64, b int64) bool {
+       f := func(a, b int64) bool {
                x := time.Unix(a, b)
                if a > 1<<62-1 {
                        return true