Switch fully to util-go
This commit is contained in:
parent
07e316fac5
commit
d116889fc9
18 changed files with 118 additions and 141 deletions
|
|
@ -32,7 +32,7 @@ import (
|
||||||
"unicode/utf16"
|
"unicode/utf16"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Node is the base interface implemented by all d2 AST nodes.
|
// Node is the base interface implemented by all d2 AST nodes.
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"oss.terrastruct.com/xrand"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
"oss.terrastruct.com/util-go/xrand"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/diff"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
|
|
||||||
|
|
@ -194,18 +195,18 @@ func TestRange(t *testing.T) {
|
||||||
|
|
||||||
var p d2ast.Position
|
var p d2ast.Position
|
||||||
p = p.Advance('a', false)
|
p = p.Advance('a', false)
|
||||||
diff.AssertJSONEq(t, `"0:1:1"`, p)
|
assert.StringJSON(t, `"0:1:1"`, p)
|
||||||
p = p.Advance('\n', false)
|
p = p.Advance('\n', false)
|
||||||
diff.AssertJSONEq(t, `"1:0:2"`, p)
|
assert.StringJSON(t, `"1:0:2"`, p)
|
||||||
p = p.Advance('è', false)
|
p = p.Advance('è', false)
|
||||||
diff.AssertJSONEq(t, `"1:2:4"`, p)
|
assert.StringJSON(t, `"1:2:4"`, p)
|
||||||
p = p.Advance('𐀀', false)
|
p = p.Advance('𐀀', false)
|
||||||
diff.AssertJSONEq(t, `"1:6:8"`, p)
|
assert.StringJSON(t, `"1:6:8"`, p)
|
||||||
|
|
||||||
p = p.Subtract('𐀀', false)
|
p = p.Subtract('𐀀', false)
|
||||||
diff.AssertJSONEq(t, `"1:2:4"`, p)
|
assert.StringJSON(t, `"1:2:4"`, p)
|
||||||
p = p.Subtract('è', false)
|
p = p.Subtract('è', false)
|
||||||
diff.AssertJSONEq(t, `"1:0:2"`, p)
|
assert.StringJSON(t, `"1:0:2"`, p)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("UTF-16", func(t *testing.T) {
|
t.Run("UTF-16", func(t *testing.T) {
|
||||||
|
|
@ -213,18 +214,18 @@ func TestRange(t *testing.T) {
|
||||||
|
|
||||||
var p d2ast.Position
|
var p d2ast.Position
|
||||||
p = p.Advance('a', true)
|
p = p.Advance('a', true)
|
||||||
diff.AssertJSONEq(t, `"0:1:1"`, p)
|
assert.StringJSON(t, `"0:1:1"`, p)
|
||||||
p = p.Advance('\n', true)
|
p = p.Advance('\n', true)
|
||||||
diff.AssertJSONEq(t, `"1:0:2"`, p)
|
assert.StringJSON(t, `"1:0:2"`, p)
|
||||||
p = p.Advance('è', true)
|
p = p.Advance('è', true)
|
||||||
diff.AssertJSONEq(t, `"1:1:3"`, p)
|
assert.StringJSON(t, `"1:1:3"`, p)
|
||||||
p = p.Advance('𐀀', true)
|
p = p.Advance('𐀀', true)
|
||||||
diff.AssertJSONEq(t, `"1:3:5"`, p)
|
assert.StringJSON(t, `"1:3:5"`, p)
|
||||||
|
|
||||||
p = p.Subtract('𐀀', true)
|
p = p.Subtract('𐀀', true)
|
||||||
diff.AssertJSONEq(t, `"1:1:3"`, p)
|
assert.StringJSON(t, `"1:1:3"`, p)
|
||||||
p = p.Subtract('è', true)
|
p = p.Subtract('è', true)
|
||||||
diff.AssertJSONEq(t, `"1:0:2"`, p)
|
assert.StringJSON(t, `"1:0:2"`, p)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -412,7 +413,7 @@ name to "America".
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
diff.AssertJSONEq(t, `{
|
assert.StringJSON(t, `{
|
||||||
"range": "json_test.d2,0:0:0-5:1:50",
|
"range": "json_test.d2,0:0:0-5:1:50",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
{
|
{
|
||||||
|
|
@ -808,7 +809,7 @@ _park `,
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
ast := d2ast.RawString(tc.str, tc.inKey)
|
ast := d2ast.RawString(tc.str, tc.inKey)
|
||||||
diff.AssertStringEq(t, tc.exp, d2format.Format(ast))
|
assert.String(t, tc.exp, d2format.Format(ast))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
"oss.terrastruct.com/util-go/diff"
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2compiler"
|
"oss.terrastruct.com/d2/d2compiler"
|
||||||
"oss.terrastruct.com/d2/d2format"
|
"oss.terrastruct.com/d2/d2format"
|
||||||
|
|
@ -775,8 +774,8 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Shape.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||||
// Make sure the DSL didn't change. this is a regression test where it did
|
// Make sure the DSL didn't change. this is a regression test where it did
|
||||||
exp := `x -> y: {
|
exp := `x -> y: {
|
||||||
source-arrowhead: {
|
source-arrowhead: {
|
||||||
|
|
@ -814,13 +813,13 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||||
diff.AssertStringEq(t, "Reisner's Rule of Conceptual Inertia", g.Edges[0].SrcArrowhead.Label.Value)
|
assert.String(t, "Reisner's Rule of Conceptual Inertia", g.Edges[0].SrcArrowhead.Label.Value)
|
||||||
diff.AssertStringEq(t, "QOTD", g.Edges[0].DstArrowhead.Label.Value)
|
assert.String(t, "QOTD", g.Edges[0].DstArrowhead.Label.Value)
|
||||||
diff.AssertStringEq(t, "true", g.Edges[0].DstArrowhead.Style.Filled.Value)
|
assert.String(t, "true", g.Edges[0].DstArrowhead.Style.Filled.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Shape.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Label.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Label.Value)
|
||||||
assert.Nil(t, g.Edges[0].Attributes.Style.Filled)
|
assert.JSON(t, nil, g.Edges[0].Attributes.Style.Filled)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -836,8 +835,8 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Shape.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -853,8 +852,8 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "triangle", g.Edges[0].SrcArrowhead.Shape.Value)
|
assert.String(t, "triangle", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Shape.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -880,8 +879,8 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "yo", g.Edges[0].SrcArrowhead.Label.Value)
|
assert.String(t, "yo", g.Edges[0].SrcArrowhead.Label.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Label.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Label.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -899,8 +898,8 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Shape.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -920,9 +919,9 @@ x -> y: {
|
||||||
if len(g.Objects) != 2 {
|
if len(g.Objects) != 2 {
|
||||||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||||
diff.AssertStringEq(t, "diamond", g.Edges[0].DstArrowhead.Shape.Value)
|
assert.String(t, "diamond", g.Edges[0].DstArrowhead.Shape.Value)
|
||||||
assert.Empty(t, g.Edges[0].Attributes.Shape.Value)
|
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1333,7 +1332,7 @@ y -> x.style
|
||||||
if len(g.Objects) != 1 {
|
if len(g.Objects) != 1 {
|
||||||
t.Fatal(g.Objects)
|
t.Fatal(g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, `b
|
assert.String(t, `b
|
||||||
b`, g.Objects[0].Attributes.Label.Value)
|
b`, g.Objects[0].Attributes.Label.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -1420,9 +1419,9 @@ b`, g.Objects[0].Attributes.Label.Value)
|
||||||
if len(g.Objects) != 1 {
|
if len(g.Objects) != 1 {
|
||||||
t.Fatal(g.Objects)
|
t.Fatal(g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, `field here`, g.Objects[0].Class.Fields[0].Name)
|
assert.String(t, `field here`, g.Objects[0].Class.Fields[0].Name)
|
||||||
diff.AssertStringEq(t, `GetType()`, g.Objects[0].Class.Methods[0].Name)
|
assert.String(t, `GetType()`, g.Objects[0].Class.Methods[0].Name)
|
||||||
diff.AssertStringEq(t, `Is()`, g.Objects[0].Class.Methods[1].Name)
|
assert.String(t, `Is()`, g.Objects[0].Class.Methods[1].Name)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1438,8 +1437,8 @@ b`, g.Objects[0].Attributes.Label.Value)
|
||||||
if len(g.Objects) != 1 {
|
if len(g.Objects) != 1 {
|
||||||
t.Fatal(g.Objects)
|
t.Fatal(g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, `GetType()`, g.Objects[0].SQLTable.Columns[0].Name)
|
assert.String(t, `GetType()`, g.Objects[0].SQLTable.Columns[0].Name)
|
||||||
diff.AssertStringEq(t, `Is()`, g.Objects[0].SQLTable.Columns[1].Name)
|
assert.String(t, `Is()`, g.Objects[0].SQLTable.Columns[1].Name)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1463,8 +1462,8 @@ b`, g.Objects[0].Attributes.Label.Value)
|
||||||
if len(g.Objects[0].ChildrenArray) != 1 {
|
if len(g.Objects[0].ChildrenArray) != 1 {
|
||||||
t.Fatal(g.Objects)
|
t.Fatal(g.Objects)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, `GetType()`, g.Objects[1].SQLTable.Columns[0].Name)
|
assert.String(t, `GetType()`, g.Objects[1].SQLTable.Columns[0].Name)
|
||||||
diff.AssertStringEq(t, `Is()`, g.Objects[1].SQLTable.Columns[1].Name)
|
assert.String(t, `Is()`, g.Objects[1].SQLTable.Columns[1].Name)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1509,7 +1508,7 @@ dst.id <-> src.dst_id
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
diff.AssertStringEq(t, "sequence_diagram", g.Objects[0].Attributes.Shape.Value)
|
assert.String(t, "sequence_diagram", g.Objects[0].Attributes.Shape.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1518,7 +1517,7 @@ dst.id <-> src.dst_id
|
||||||
text: `shape: sequence_diagram
|
text: `shape: sequence_diagram
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
diff.AssertStringEq(t, "sequence_diagram", g.Root.Attributes.Shape.Value)
|
assert.String(t, "sequence_diagram", g.Root.Attributes.Shape.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1526,7 +1525,7 @@ dst.id <-> src.dst_id
|
||||||
|
|
||||||
text: `direction: right`,
|
text: `direction: right`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
diff.AssertStringEq(t, "right", g.Root.Attributes.Direction.Value)
|
assert.String(t, "right", g.Root.Attributes.Direction.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1534,7 +1533,7 @@ dst.id <-> src.dst_id
|
||||||
|
|
||||||
text: `x`,
|
text: `x`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
diff.AssertStringEq(t, "", g.Objects[0].Attributes.Direction.Value)
|
assert.String(t, "", g.Objects[0].Attributes.Direction.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1544,7 +1543,7 @@ dst.id <-> src.dst_id
|
||||||
direction: left
|
direction: left
|
||||||
}`,
|
}`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
diff.AssertStringEq(t, "left", g.Objects[0].Attributes.Direction.Value)
|
assert.String(t, "left", g.Objects[0].Attributes.Direction.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1594,10 +1593,8 @@ dst.id <-> src.dst_id
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = diff.Testdata(filepath.Join("..", "testdata", "d2compiler", t.Name()), got)
|
err = diff.TestdataJSON(filepath.Join("..", "testdata", "d2compiler", t.Name()), got)
|
||||||
if err != nil {
|
assert.Success(t, err)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,8 @@ import (
|
||||||
|
|
||||||
"cdr.dev/slog"
|
"cdr.dev/slog"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
"oss.terrastruct.com/util-go/diff"
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2compiler"
|
"oss.terrastruct.com/d2/d2compiler"
|
||||||
"oss.terrastruct.com/d2/d2exporter"
|
"oss.terrastruct.com/d2/d2exporter"
|
||||||
|
|
@ -215,10 +214,10 @@ func run(t *testing.T, tc testCase) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ruler, err := textmeasure.NewRuler()
|
ruler, err := textmeasure.NewRuler()
|
||||||
assert.Nil(t, err)
|
assert.JSON(t, nil, err)
|
||||||
|
|
||||||
err = g.SetDimensions(nil, ruler)
|
err = g.SetDimensions(nil, ruler)
|
||||||
assert.Nil(t, err)
|
assert.JSON(t, nil, err)
|
||||||
|
|
||||||
err = d2dagrelayout.Layout(ctx, g)
|
err = d2dagrelayout.Layout(ctx, g)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -252,8 +251,6 @@ func run(t *testing.T, tc testCase) {
|
||||||
got.Connections[i].LabelPosition = ""
|
got.Connections[i].LabelPosition = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
err = diff.Testdata(filepath.Join("..", "testdata", "d2exporter", t.Name()), got)
|
err = diff.TestdataJSON(filepath.Join("..", "testdata", "d2exporter", t.Name()), got)
|
||||||
if err != nil {
|
assert.Success(t, err)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package d2format_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2ast"
|
"oss.terrastruct.com/d2/d2ast"
|
||||||
"oss.terrastruct.com/d2/d2format"
|
"oss.terrastruct.com/d2/d2format"
|
||||||
|
|
@ -42,7 +42,7 @@ func TestEscapeSingleQuoted(t *testing.T) {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
diff.AssertStringEq(t, tc.exp, d2format.Format(&d2ast.SingleQuotedString{
|
assert.String(t, tc.exp, d2format.Format(&d2ast.SingleQuotedString{
|
||||||
Value: tc.str,
|
Value: tc.str,
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|
@ -104,7 +104,7 @@ func TestEscapeDoubleQuoted(t *testing.T) {
|
||||||
} else {
|
} else {
|
||||||
n = d2ast.FlatDoubleQuotedString(tc.str)
|
n = d2ast.FlatDoubleQuotedString(tc.str)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, tc.exp, d2format.Format(n))
|
assert.String(t, tc.exp, d2format.Format(n))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -203,7 +203,7 @@ func TestEscapeUnquoted(t *testing.T) {
|
||||||
n = d2ast.FlatUnquotedString(tc.str)
|
n = d2ast.FlatUnquotedString(tc.str)
|
||||||
}
|
}
|
||||||
|
|
||||||
diff.AssertStringEq(t, tc.exp, d2format.Format(n))
|
assert.String(t, tc.exp, d2format.Format(n))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -286,7 +286,7 @@ func TestEscapeBlockString(t *testing.T) {
|
||||||
Value: tc.value,
|
Value: tc.value,
|
||||||
}
|
}
|
||||||
|
|
||||||
diff.AssertStringEq(t, tc.exp, d2format.Format(n))
|
assert.String(t, tc.exp, d2format.Format(n))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2format"
|
"oss.terrastruct.com/d2/d2format"
|
||||||
"oss.terrastruct.com/d2/d2parser"
|
"oss.terrastruct.com/d2/d2parser"
|
||||||
|
|
@ -605,7 +605,7 @@ hi # Fraud is the homage that force pays to reason.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, tc.exp, d2format.Format(ast))
|
assert.String(t, tc.exp, d2format.Format(ast))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -621,6 +621,6 @@ func TestEdge(t *testing.T) {
|
||||||
t.Fatalf("expected one edge: %#v", mk.Edges)
|
t.Fatalf("expected one edge: %#v", mk.Edges)
|
||||||
}
|
}
|
||||||
|
|
||||||
diff.AssertStringEq(t, `x -> y`, d2format.Format(mk.Edges[0]))
|
assert.String(t, `x -> y`, d2format.Format(mk.Edges[0]))
|
||||||
diff.AssertStringEq(t, `[0]`, d2format.Format(mk.EdgeIndex))
|
assert.String(t, `[0]`, d2format.Format(mk.EdgeIndex))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2graph"
|
"oss.terrastruct.com/d2/d2graph"
|
||||||
"oss.terrastruct.com/d2/d2parser"
|
"oss.terrastruct.com/d2/d2parser"
|
||||||
|
|
@ -44,7 +44,7 @@ func TestKey(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
diff.AssertStringEq(t, tc.exp, strings.Join(d2graph.Key(k), "."))
|
assert.String(t, tc.exp, strings.Join(d2graph.Key(k), "."))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"cdr.dev/slog"
|
"cdr.dev/slog"
|
||||||
v8 "rogchap.com/v8go"
|
v8 "rogchap.com/v8go"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import (
|
||||||
|
|
||||||
"rogchap.com/v8go"
|
"rogchap.com/v8go"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
|
|
||||||
"oss.terrastruct.com/xrand"
|
"oss.terrastruct.com/util-go/xrand"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
"oss.terrastruct.com/util-go/diff"
|
||||||
"oss.terrastruct.com/xjson"
|
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
|
"oss.terrastruct.com/util-go/xjson"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2compiler"
|
"oss.terrastruct.com/d2/d2compiler"
|
||||||
"oss.terrastruct.com/d2/d2format"
|
"oss.terrastruct.com/d2/d2format"
|
||||||
|
|
@ -967,10 +964,10 @@ z: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, 3, len(g.Objects))
|
assert.JSON(t, 3, len(g.Objects))
|
||||||
assert.Equal(t, 1, len(g.Edges))
|
assert.JSON(t, 1, len(g.Edges))
|
||||||
assert.Equal(t, "q", g.Edges[0].Src.ID)
|
assert.JSON(t, "q", g.Edges[0].Src.ID)
|
||||||
assert.Equal(t, "0.4", g.Edges[0].Attributes.Style.Opacity.Value)
|
assert.JSON(t, "0.4", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1618,8 +1615,8 @@ func TestMove(t *testing.T) {
|
||||||
exp: `b
|
exp: `b
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 1)
|
assert.JSON(t, len(g.Objects), 1)
|
||||||
assert.Equal(t, g.Objects[0].ID, "b")
|
assert.JSON(t, g.Objects[0].ID, "b")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1637,8 +1634,8 @@ func TestMove(t *testing.T) {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 2)
|
assert.JSON(t, len(g.Objects), 2)
|
||||||
assert.Equal(t, g.Objects[1].ID, "c")
|
assert.JSON(t, g.Objects[1].ID, "c")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1693,9 +1690,9 @@ c
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 3)
|
assert.JSON(t, len(g.Objects), 3)
|
||||||
assert.Equal(t, "a", g.Objects[0].ID)
|
assert.JSON(t, "a", g.Objects[0].ID)
|
||||||
assert.Equal(t, 2, len(g.Objects[0].Children))
|
assert.JSON(t, 2, len(g.Objects[0].Children))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1734,9 +1731,9 @@ c
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 2)
|
assert.JSON(t, len(g.Objects), 2)
|
||||||
assert.Equal(t, "a", g.Objects[0].ID)
|
assert.JSON(t, "a", g.Objects[0].ID)
|
||||||
assert.Equal(t, 1, len(g.Objects[0].Children))
|
assert.JSON(t, 1, len(g.Objects[0].Children))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1753,9 +1750,9 @@ c
|
||||||
b
|
b
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 2)
|
assert.JSON(t, len(g.Objects), 2)
|
||||||
assert.Equal(t, "a", g.Objects[0].ID)
|
assert.JSON(t, "a", g.Objects[0].ID)
|
||||||
assert.Equal(t, 0, len(g.Objects[0].Children))
|
assert.JSON(t, 0, len(g.Objects[0].Children))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1864,11 +1861,11 @@ c: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 3)
|
assert.JSON(t, len(g.Objects), 3)
|
||||||
assert.Equal(t, "a", g.Objects[0].ID)
|
assert.JSON(t, "a", g.Objects[0].ID)
|
||||||
assert.Equal(t, 0, len(g.Objects[0].Children))
|
assert.JSON(t, 0, len(g.Objects[0].Children))
|
||||||
assert.Equal(t, "c", g.Objects[1].ID)
|
assert.JSON(t, "c", g.Objects[1].ID)
|
||||||
assert.Equal(t, 1, len(g.Objects[1].Children))
|
assert.JSON(t, 1, len(g.Objects[1].Children))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1930,7 +1927,7 @@ a: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 3)
|
assert.JSON(t, len(g.Objects), 3)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1987,7 +1984,7 @@ c: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 3)
|
assert.JSON(t, len(g.Objects), 3)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -2005,7 +2002,7 @@ d: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 4)
|
assert.JSON(t, len(g.Objects), 4)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -2024,7 +2021,7 @@ c: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||||
assert.Equal(t, len(g.Objects), 4)
|
assert.JSON(t, len(g.Objects), 4)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4423,10 +4420,8 @@ func (tc editTest) run(t *testing.T) {
|
||||||
Err: fmt.Sprintf("%#v", err),
|
Err: fmt.Sprintf("%#v", err),
|
||||||
}
|
}
|
||||||
|
|
||||||
err = diff.Testdata(filepath.Join("..", "testdata", "d2oracle", t.Name()), got)
|
err = diff.TestdataJSON(filepath.Join("..", "testdata", "d2oracle", t.Name()), got)
|
||||||
if err != nil {
|
assert.Success(t, err)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMoveIDDeltas(t *testing.T) {
|
func TestMoveIDDeltas(t *testing.T) {
|
||||||
|
|
@ -4636,7 +4631,7 @@ x.a -> x.b
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ds, err := diff.Strings(tc.exp, xjson.MarshalIndent(deltas))
|
ds, err := diff.Strings(tc.exp, string(xjson.Marshal(deltas)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
@ -4826,7 +4821,7 @@ x.y.z.w.e.p.l -> x.y.z.1.2.3.4
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ds, err := diff.Strings(tc.exp, xjson.MarshalIndent(deltas))
|
ds, err := diff.Strings(tc.exp, string(xjson.Marshal(deltas)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
@ -4978,7 +4973,7 @@ x.y.z.w.e.p.l -> x.y.z.1.2.3.4
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ds, err := diff.Strings(tc.exp, xjson.MarshalIndent(deltas))
|
ds, err := diff.Strings(tc.exp, string(xjson.Marshal(deltas)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"oss.terrastruct.com/diff"
|
"oss.terrastruct.com/util-go/assert"
|
||||||
|
"oss.terrastruct.com/util-go/diff"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2ast"
|
"oss.terrastruct.com/d2/d2ast"
|
||||||
"oss.terrastruct.com/d2/d2parser"
|
"oss.terrastruct.com/d2/d2parser"
|
||||||
|
|
@ -382,10 +383,8 @@ q.(x -> y).z: (rawr)
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = diff.Testdata(filepath.Join("..", "testdata", "d2parser", t.Name()), got)
|
err = diff.TestdataJSON(filepath.Join("..", "testdata", "d2parser", t.Name()), got)
|
||||||
if err != nil {
|
assert.Success(t, err)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2graph"
|
"oss.terrastruct.com/d2/d2graph"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
v8 "rogchap.com/v8go"
|
v8 "rogchap.com/v8go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
2
fmt.go
2
fmt.go
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/xmain"
|
"oss.terrastruct.com/util-go/xmain"
|
||||||
|
|
||||||
|
|
|
||||||
4
go.mod
generated
4
go.mod
generated
|
|
@ -20,11 +20,7 @@ require (
|
||||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
|
||||||
gonum.org/v1/plot v0.12.0
|
gonum.org/v1/plot v0.12.0
|
||||||
nhooyr.io/websocket v1.8.7
|
nhooyr.io/websocket v1.8.7
|
||||||
oss.terrastruct.com/diff v1.0.2-0.20221116222035-8bf4dd3ab541
|
|
||||||
oss.terrastruct.com/util-go v0.0.0-20221201191904-5edc89ce397b
|
oss.terrastruct.com/util-go v0.0.0-20221201191904-5edc89ce397b
|
||||||
oss.terrastruct.com/xdefer v0.0.0-20221017222355-6f3b6e4d1557
|
|
||||||
oss.terrastruct.com/xjson v0.0.0-20221018000420-4986731c4c4a
|
|
||||||
oss.terrastruct.com/xrand v0.0.0-20221020211818-4ac08e618333
|
|
||||||
rogchap.com/v8go v0.7.1-0.20221102201510-1f00b5007d95
|
rogchap.com/v8go v0.7.1-0.20221102201510-1f00b5007d95
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
8
go.sum
generated
8
go.sum
generated
|
|
@ -798,16 +798,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
|
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
|
||||||
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
||||||
oss.terrastruct.com/diff v1.0.2-0.20221116222035-8bf4dd3ab541 h1:I9B1O1IJ6spivIQxbFRZmbhAwVeLwrcQRR1JbYUOvrI=
|
|
||||||
oss.terrastruct.com/diff v1.0.2-0.20221116222035-8bf4dd3ab541/go.mod h1:ags2QDy/T6jr69hT6bpmAmhr2H98n9o8Atf3QlUJPiU=
|
|
||||||
oss.terrastruct.com/util-go v0.0.0-20221201191904-5edc89ce397b h1:o8+5KfZpQyaw7uKcPIdc9HOqVjVDEdsPZpdRV1k0rmc=
|
oss.terrastruct.com/util-go v0.0.0-20221201191904-5edc89ce397b h1:o8+5KfZpQyaw7uKcPIdc9HOqVjVDEdsPZpdRV1k0rmc=
|
||||||
oss.terrastruct.com/util-go v0.0.0-20221201191904-5edc89ce397b/go.mod h1:Fwy72FDIOOM4K8F96ScXkxHHppR1CPfUyo9+x9c1PBU=
|
oss.terrastruct.com/util-go v0.0.0-20221201191904-5edc89ce397b/go.mod h1:Fwy72FDIOOM4K8F96ScXkxHHppR1CPfUyo9+x9c1PBU=
|
||||||
oss.terrastruct.com/xdefer v0.0.0-20221017222355-6f3b6e4d1557 h1:rPbhJbN1q7B4tnppSPoAMwq0t6Pk5SrQDQ5S6uoNNHg=
|
|
||||||
oss.terrastruct.com/xdefer v0.0.0-20221017222355-6f3b6e4d1557/go.mod h1:plvfydF5METAlsbpeuSz44jckaOwrCWX3M0kTLoCA4I=
|
|
||||||
oss.terrastruct.com/xjson v0.0.0-20221018000420-4986731c4c4a h1:AAcupsjBwpbcyLASX0ppDlxbfHWb5Neq5gWdGpLfaSA=
|
|
||||||
oss.terrastruct.com/xjson v0.0.0-20221018000420-4986731c4c4a/go.mod h1:XJ71qiTzk/dbTWuYbuLJuRpBdKFN06Sk5FdFpq2TNmE=
|
|
||||||
oss.terrastruct.com/xrand v0.0.0-20221020211818-4ac08e618333 h1:7EdxwXM75Id1VIN71QbE8bLzZRMs0qD7olnDw5gbI7w=
|
|
||||||
oss.terrastruct.com/xrand v0.0.0-20221020211818-4ac08e618333/go.mod h1:O7TAoBmlQhoi46RdgVikDcoLRb/vLflhkXCAd+nO4SM=
|
|
||||||
rogchap.com/v8go v0.7.1-0.20221102201510-1f00b5007d95 h1:r89YHVIWeQj/A3Nu6462eqARUECJlJkLRk36pfML1xA=
|
rogchap.com/v8go v0.7.1-0.20221102201510-1f00b5007d95 h1:r89YHVIWeQj/A3Nu6462eqARUECJlJkLRk36pfML1xA=
|
||||||
rogchap.com/v8go v0.7.1-0.20221102201510-1f00b5007d95/go.mod h1:MxgP3pL2MW4dpme/72QRs8sgNMmM0pRc8DPhcuLWPAs=
|
rogchap.com/v8go v0.7.1-0.20221102201510-1f00b5007d95/go.mod h1:MxgP3pL2MW4dpme/72QRs8sgNMmM0pRc8DPhcuLWPAs=
|
||||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
"oss.terrastruct.com/xdefer"
|
"oss.terrastruct.com/util-go/xdefer"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/xmain"
|
"oss.terrastruct.com/util-go/xmain"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue