]> Cypherpunks repositories - gostls13.git/commitdiff
log/slog: correct formatting
authorJoel Sing <joel@sing.id.au>
Fri, 16 Feb 2024 15:21:11 +0000 (02:21 +1100)
committerJonathan Amsterdam <jba@google.com>
Tue, 20 Feb 2024 20:44:14 +0000 (20:44 +0000)
Code added in CL #558755 and CL #561315 (both via github) were not
appropriately formatted. Run gofmt to address this.

Change-Id: Iaf7abca9c2ad4e0fabecc417234b743b6b15e9c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/564719
Run-TryBot: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
src/log/slog/level_test.go
src/log/slog/value_test.go

index 19adcd8466f1ace883dff038c66ed5c8d0f6b0c4..217a0d7204915a5a87ec59be33240e91b8ae9e02 100644 (file)
@@ -59,8 +59,8 @@ func TestLevelMarshalJSON(t *testing.T) {
                t.Fatal(err)
        }
        if !bytes.Equal(data, wantData) {
-                t.Errorf("got %s, want %s", string(data), string(wantData))
-        }
+               t.Errorf("got %s, want %s", string(data), string(wantData))
+       }
        var got Level
        if err := got.UnmarshalJSON(data); err != nil {
                t.Fatal(err)
@@ -78,8 +78,8 @@ func TestLevelMarshalText(t *testing.T) {
                t.Fatal(err)
        }
        if !bytes.Equal(data, wantData) {
-                t.Errorf("got %s, want %s", string(data), string(wantData))
-        }
+               t.Errorf("got %s, want %s", string(data), string(wantData))
+       }
        var got Level
        if err := got.UnmarshalText(data); err != nil {
                t.Fatal(err)
index df83da4d6925efd2754c3e0903b0b532b25a0a2f..033f945407ef8ec18d162593ee58d01b900c4fe9 100644 (file)
@@ -37,9 +37,9 @@ func TestValueEqual(t *testing.T) {
                GroupValue(Bool("b", true), Int("i", 4)),
                GroupValue(Bool("b", true), Int("j", 4)),
                DurationValue(3 * time.Second),
-                DurationValue(2 * time.Second),
-                StringValue("foo"),
-                StringValue("fuu"),
+               DurationValue(2 * time.Second),
+               StringValue("foo"),
+               StringValue("fuu"),
        }
        for i, v1 := range vals {
                for j, v2 := range vals {