Skip to content

Commit e769e47

Browse files
committed
internal/encoding/yaml: drop use of kr/pretty in a test
This debug helper was added back in 2019 but it hasn't been used since; for example, I rewrote the yaml package to use yaml.v3 a year ago and I didn't even notice it was there. For now it seems best to keep the set of direct module dependencies lean unless there's a clear benefit to added dependencies. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I7e3f31b1563ad0dedd4742af5644221c894e2554 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1215625 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Roger Peppe <[email protected]>
1 parent 9418bb0 commit e769e47

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ require (
1010
github.com/google/go-cmp v0.7.0
1111
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
1212
github.com/google/uuid v1.6.0
13-
github.com/kr/pretty v0.3.1
1413
github.com/opencontainers/go-digest v1.0.0
1514
github.com/opencontainers/image-spec v1.1.1
1615
github.com/pelletier/go-toml/v2 v2.2.4
@@ -32,6 +31,7 @@ require (
3231

3332
require (
3433
github.com/inconshreveable/mousetrap v1.1.0 // indirect
34+
github.com/kr/pretty v0.3.1 // indirect
3535
github.com/kr/text v0.2.0 // indirect
3636
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
3737
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect

internal/encoding/yaml/encode_test.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"testing"
2020

2121
"github.com/google/go-cmp/cmp"
22-
"github.com/kr/pretty"
2322
"gopkg.in/yaml.v3"
2423

2524
"cuelang.org/go/cue/ast"
@@ -326,20 +325,3 @@ true
326325
})
327326
}
328327
}
329-
330-
// TestX is for experimentation with the YAML package to figure out the
331-
// semantics of the Node type.
332-
func TestX(t *testing.T) {
333-
t.Skip()
334-
var n yaml.Node
335-
yaml.Unmarshal([]byte(`
336-
# map
337-
map: {
338-
# doc
339-
} # line 1
340-
341-
`), &n)
342-
343-
pretty.Print(n)
344-
t.Fail()
345-
}

0 commit comments

Comments
 (0)