diff --git a/go.mod b/go.mod index 5375dc1..9cf005b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ddddddO/gtree -go 1.18 +go 1.19 require ( github.com/fatih/color v1.13.0 diff --git a/node_generate_strategy_test.go b/node_generate_strategy_test.go index 53e9661..65cf342 100644 --- a/node_generate_strategy_test.go +++ b/node_generate_strategy_test.go @@ -20,13 +20,13 @@ func TestTabStrategy_Generate(t *testing.T) { row string want *want }{ - "root/hierarchy=1": {"- aaa bb", &want{name: "aaa bb", hierarchy: 1, index: fixedIndex, err: nil}}, - "child/hierarchy=2": {" - aaa bb", &want{name: "aaa bb", hierarchy: 2, index: fixedIndex, err: nil}}, + "root/hierarchy=1": {"- aaa bb", &want{name: "aaa bb", hierarchy: 1, index: fixedIndex, err: nil}}, + "child/hierarchy=2": {" - aaa bb", &want{name: "aaa bb", hierarchy: 2, index: fixedIndex, err: nil}}, "child/hierarchy=2/tab on the way": {" - aaa bb", &want{name: "aaa bb", hierarchy: 2, index: fixedIndex, err: nil}}, "invalid/hierarchy=0/prefix space": {" - aaa bb", &want{err: errIncorrectFormat}}, "invalid/hierarchy=0/prefix chars": {"xx- aaa bb", &want{err: errIncorrectFormat}}, "invalid/hierarchy=0/no hyphen": {"xx aaa bb", &want{err: errIncorrectFormat}}, - "invalid/hierarchy=0/tab only": {" ", &want{err: errIncorrectFormat}}, + "invalid/hierarchy=0/tab only": {" ", &want{err: errIncorrectFormat}}, } for name, tt := range tests {