Closed slimsag closed 3 years ago
While the tests here show only a few readability improvements, on larger code-bases the difference is quite substantial (even without the long-line formatting yet):
diff --git a/internal/syntax/parse/testdata/TestString__comby.golden b/internal/syntax/parse/testdata/TestString__comby.golden
index 1cf1807..988df30 100644
--- a/internal/syntax/parse/testdata/TestString__comby.golden
+++ b/internal/syntax/parse/testdata/TestString__comby.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{CombyCode: &st.ExprCombyCode{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{CombyCode: &st.ExprCombyCode{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__comby_doctypes.golden b/internal/syntax/parse/testdata/TestString__comby_doctypes.golden
index e30bdb1..19534a7 100644
--- a/internal/syntax/parse/testdata/TestString__comby_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__comby_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}, Expr: &st.QueryExpr{CombyCode: &st.ExprCombyCode{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}, Expr: &st.QueryExpr{CombyCode: &st.ExprCombyCode{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__comby_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__comby_doctypes_invalid_options.golden
index 1a6d7dd..0d4a862 100644
--- a/internal/syntax/parse/testdata/TestString__comby_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__comby_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 11, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 11, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
diff --git a/internal/syntax/parse/testdata/TestString__comby_invalid_options.golden b/internal/syntax/parse/testdata/TestString__comby_invalid_options.golden
index 9aec439..dcc8c2a 100644
--- a/internal/syntax/parse/testdata/TestString__comby_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__comby_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 4, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 4, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
diff --git a/internal/syntax/parse/testdata/TestString__comby_options.golden b/internal/syntax/parse/testdata/TestString__comby_options.golden
index 4fde08d..6ef1865 100644
--- a/internal/syntax/parse/testdata/TestString__comby_options.golden
+++ b/internal/syntax/parse/testdata/TestString__comby_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 13, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found delimiter"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 13, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found delimiter"}}
diff --git a/internal/syntax/parse/testdata/TestString__default.golden b/internal/syntax/parse/testdata/TestString__default.golden
index e362059..a7f7380 100644
--- a/internal/syntax/parse/testdata/TestString__default.golden
+++ b/internal/syntax/parse/testdata/TestString__default.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 6, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found errorf"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 6, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found errorf"}}
diff --git a/internal/syntax/parse/testdata/TestString__default_doctypes.golden b/internal/syntax/parse/testdata/TestString__default_doctypes.golden
index ac49366..ac5bdea 100644
--- a/internal/syntax/parse/testdata/TestString__default_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__default_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}, Expr: &st.QueryExpr{Default: &st.ExprDefault{Question: true, Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}, Expr: &st.QueryExpr{Default: &st.ExprDefault{Question: true, Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__default_doctypes_multiple_options.golden b/internal/syntax/parse/testdata/TestString__default_doctypes_multiple_options.golden
index 5e46526..bea9303 100644
--- a/internal/syntax/parse/testdata/TestString__default_doctypes_multiple_options.golden
+++ b/internal/syntax/parse/testdata/TestString__default_doctypes_multiple_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 25, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 25, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
diff --git a/internal/syntax/parse/testdata/TestString__default_doctypes_options.golden b/internal/syntax/parse/testdata/TestString__default_doctypes_options.golden
index 1a6d7dd..0d4a862 100644
--- a/internal/syntax/parse/testdata/TestString__default_doctypes_options.golden
+++ b/internal/syntax/parse/testdata/TestString__default_doctypes_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 11, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 11, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
diff --git a/internal/syntax/parse/testdata/TestString__default_options.golden b/internal/syntax/parse/testdata/TestString__default_options.golden
index 9aec439..dcc8c2a 100644
--- a/internal/syntax/parse/testdata/TestString__default_options.golden
+++ b/internal/syntax/parse/testdata/TestString__default_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 4, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 4, Parsing: parse.NodeType(parse.NodeType)("OptionsCombyCode"), Message: ": valid options are (delimiter), found case"}}
diff --git a/internal/syntax/parse/testdata/TestString__empty_string.golden b/internal/syntax/parse/testdata/TestString__empty_string.golden
index bba7092..6103c6d 100644
--- a/internal/syntax/parse/testdata/TestString__empty_string.golden
+++ b/internal/syntax/parse/testdata/TestString__empty_string.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Default: &st.ExprDefault{}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Default: &st.ExprDefault{}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__fuzzy.golden b/internal/syntax/parse/testdata/TestString__fuzzy.golden
index ae43348..0fede0e 100644
--- a/internal/syntax/parse/testdata/TestString__fuzzy.golden
+++ b/internal/syntax/parse/testdata/TestString__fuzzy.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__fuzzy_doctypes.golden b/internal/syntax/parse/testdata/TestString__fuzzy_doctypes.golden
index ea692a5..fff2a9b 100644
--- a/internal/syntax/parse/testdata/TestString__fuzzy_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__fuzzy_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_invalid_options.golden
index 4074b4d..733fcb3 100644
--- a/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
diff --git a/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_options.golden b/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_options.golden
index d587566..0333da4 100644
--- a/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_options.golden
+++ b/internal/syntax/parse/testdata/TestString__fuzzy_doctypes_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Options: &st.OptionsFuzzy{Options: st.Options{CST: &st.OptionsCST{Option: &st.Option{Key: "multiline"}, Separator: ",", Next: &st.OptionsCST{Option: &st.Option{Key: "case"}}}}}, Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Options: &st.OptionsFuzzy{Options: st.Options{CST: &st.OptionsCST{Option: &st.Option{Key: "multiline"}, Separator: ",", Next: &st.OptionsCST{Option: &st.Option{Key: "case"}}}}}, Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__fuzzy_options.golden b/internal/syntax/parse/testdata/TestString__fuzzy_options.golden
index 0365bba..9585f6c 100644
--- a/internal/syntax/parse/testdata/TestString__fuzzy_options.golden
+++ b/internal/syntax/parse/testdata/TestString__fuzzy_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Options: &st.OptionsFuzzy{Options: st.Options{CST: &st.OptionsCST{Option: &st.Option{Key: "multiline"}, Separator: ",", Next: &st.OptionsCST{Option: &st.Option{Key: "case"}}}}}, Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Fuzzy: &st.ExprFuzzy{Options: &st.OptionsFuzzy{Options: st.Options{CST: &st.OptionsCST{Option: &st.Option{Key: "multiline"}, Separator: ",", Next: &st.OptionsCST{Option: &st.Option{Key: "case"}}}}}, Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__literal.golden b/internal/syntax/parse/testdata/TestString__literal.golden
index 4f48883..643b004 100644
--- a/internal/syntax/parse/testdata/TestString__literal.golden
+++ b/internal/syntax/parse/testdata/TestString__literal.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Literal: &st.ExprLiteral{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Literal: &st.ExprLiteral{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__literal_doctypes.golden b/internal/syntax/parse/testdata/TestString__literal_doctypes.golden
index e64ec5a..65e32e8 100644
--- a/internal/syntax/parse/testdata/TestString__literal_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__literal_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Literal: &st.ExprLiteral{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Literal: &st.ExprLiteral{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__literal_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__literal_doctypes_invalid_options.golden
index 4074b4d..733fcb3 100644
--- a/internal/syntax/parse/testdata/TestString__literal_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__literal_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
diff --git a/internal/syntax/parse/testdata/TestString__literal_doctypes_options.golden b/internal/syntax/parse/testdata/TestString__literal_doctypes_options.golden
index f4e976c..b8bb0ab 100644
--- a/internal/syntax/parse/testdata/TestString__literal_doctypes_options.golden
+++ b/internal/syntax/parse/testdata/TestString__literal_doctypes_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
diff --git a/internal/syntax/parse/testdata/TestString__literal_options.golden b/internal/syntax/parse/testdata/TestString__literal_options.golden
index 6178019..fba4a4a 100644
--- a/internal/syntax/parse/testdata/TestString__literal_options.golden
+++ b/internal/syntax/parse/testdata/TestString__literal_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
diff --git a/internal/syntax/parse/testdata/TestString__logical_and.golden b/internal/syntax/parse/testdata/TestString__logical_and.golden
index aba9940..b17e83a 100644
--- a/internal/syntax/parse/testdata/TestString__logical_and.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_and.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Logical: &st.ExprLogical{And: &st.ExprLogicalAnd{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Logical: &st.ExprLogical{And: &st.ExprLogicalAnd{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__logical_and_not.golden b/internal/syntax/parse/testdata/TestString__logical_and_not.golden
index 9cad835..55745ca 100644
--- a/internal/syntax/parse/testdata/TestString__logical_and_not.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_and_not.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Logical: &st.ExprLogical{AndNot: &st.ExprLogicalAndNot{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Logical: &st.ExprLogical{AndNot: &st.ExprLogicalAndNot{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__logical_doctypes.golden b/internal/syntax/parse/testdata/TestString__logical_doctypes.golden
index 5218b41..92d51df 100644
--- a/internal/syntax/parse/testdata/TestString__logical_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Logical: &st.ExprLogical{Or: &st.ExprLogicalOr{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Logical: &st.ExprLogical{Or: &st.ExprLogicalOr{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__logical_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__logical_doctypes_invalid_options.golden
index f4e976c..b8bb0ab 100644
--- a/internal/syntax/parse/testdata/TestString__logical_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
diff --git a/internal/syntax/parse/testdata/TestString__logical_error.golden b/internal/syntax/parse/testdata/TestString__logical_error.golden
index 3310167..7c3c707 100644
--- a/internal/syntax/parse/testdata/TestString__logical_error.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_error.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Default: &st.ExprDefault{Terms: "(errorf)"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Default: &st.ExprDefault{Terms: "(errorf)"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__logical_invalid_options.golden b/internal/syntax/parse/testdata/TestString__logical_invalid_options.golden
index 6178019..fba4a4a 100644
--- a/internal/syntax/parse/testdata/TestString__logical_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
diff --git a/internal/syntax/parse/testdata/TestString__logical_or.golden b/internal/syntax/parse/testdata/TestString__logical_or.golden
index be3a82d..4c2f812 100644
--- a/internal/syntax/parse/testdata/TestString__logical_or.golden
+++ b/internal/syntax/parse/testdata/TestString__logical_or.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Logical: &st.ExprLogical{Or: &st.ExprLogicalOr{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Logical: &st.ExprLogical{Or: &st.ExprLogicalOr{Left: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}, Right: st.QueryExpr{Default: &st.ExprDefault{Terms: "not implemented"}}}}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__metadata.golden b/internal/syntax/parse/testdata/TestString__metadata.golden
index 893d8f9..ce58694 100644
--- a/internal/syntax/parse/testdata/TestString__metadata.golden
+++ b/internal/syntax/parse/testdata/TestString__metadata.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Metadata: &st.ExprMetadata{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Metadata: &st.ExprMetadata{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__metadata_doctypes.golden b/internal/syntax/parse/testdata/TestString__metadata_doctypes.golden
index df0318a..996a4b1 100644
--- a/internal/syntax/parse/testdata/TestString__metadata_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__metadata_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Metadata: &st.ExprMetadata{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Metadata: &st.ExprMetadata{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__metadata_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__metadata_doctypes_invalid_options.golden
index f4e976c..b8bb0ab 100644
--- a/internal/syntax/parse/testdata/TestString__metadata_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__metadata_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
diff --git a/internal/syntax/parse/testdata/TestString__metadata_invalid_options.golden b/internal/syntax/parse/testdata/TestString__metadata_invalid_options.golden
index 6178019..fba4a4a 100644
--- a/internal/syntax/parse/testdata/TestString__metadata_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__metadata_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found wholeline"}}
diff --git a/internal/syntax/parse/testdata/TestString__regex.golden b/internal/syntax/parse/testdata/TestString__regex.golden
index 1219a1e..6ef4524 100644
--- a/internal/syntax/parse/testdata/TestString__regex.golden
+++ b/internal/syntax/parse/testdata/TestString__regex.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Regex: &st.ExprRegex{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Regex: &st.ExprRegex{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__regex_doctypes.golden b/internal/syntax/parse/testdata/TestString__regex_doctypes.golden
index e221dcc..3c8fa4d 100644
--- a/internal/syntax/parse/testdata/TestString__regex_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__regex_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Regex: &st.ExprRegex{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Regex: &st.ExprRegex{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__regex_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__regex_doctypes_invalid_options.golden
index 4074b4d..733fcb3 100644
--- a/internal/syntax/parse/testdata/TestString__regex_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__regex_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
diff --git a/internal/syntax/parse/testdata/TestString__regex_doctypes_options.golden b/internal/syntax/parse/testdata/TestString__regex_doctypes_options.golden
index e45f811..8e535e7 100644
--- a/internal/syntax/parse/testdata/TestString__regex_doctypes_options.golden
+++ b/internal/syntax/parse/testdata/TestString__regex_doctypes_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
diff --git a/internal/syntax/parse/testdata/TestString__regex_options.golden b/internal/syntax/parse/testdata/TestString__regex_options.golden
index f146f75..f9c3dbf 100644
--- a/internal/syntax/parse/testdata/TestString__regex_options.golden
+++ b/internal/syntax/parse/testdata/TestString__regex_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
diff --git a/internal/syntax/parse/testdata/TestString__tristruct.golden b/internal/syntax/parse/testdata/TestString__tristruct.golden
index 49cb168..2273877 100644
--- a/internal/syntax/parse/testdata/TestString__tristruct.golden
+++ b/internal/syntax/parse/testdata/TestString__tristruct.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{Expr: &st.QueryExpr{Tristruct: &st.ExprTristruct{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{Expr: &st.QueryExpr{Tristruct: &st.ExprTristruct{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__tristruct_doctypes.golden b/internal/syntax/parse/testdata/TestString__tristruct_doctypes.golden
index 84eb986..bd508a5 100644
--- a/internal/syntax/parse/testdata/TestString__tristruct_doctypes.golden
+++ b/internal/syntax/parse/testdata/TestString__tristruct_doctypes.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Tristruct: &st.ExprTristruct{Terms: "errorf"}}}, nil}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}, Expr: &st.QueryExpr{Tristruct: &st.ExprTristruct{Terms: "errorf"}}}, nil}
diff --git a/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options#01.golden b/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options#01.golden
index 4074b4d..733fcb3 100644
--- a/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options#01.golden
+++ b/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options#01.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foobar"}}}}, &parse.Error{Offset: 15, Parsing: parse.NodeType(parse.NodeType)("OptionsFuzzy"), Message: ": valid options are (multiline, case), found notvalid"}}
diff --git a/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options.golden b/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options.golden
index e45f811..8e535e7 100644
--- a/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__tristruct_doctypes_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
+[2]interface{}{&st.Query{DocTypes: &st.DocTypes{CST: &st.DocTypesCST{List: &st.DocTypesListCST{Name: "foo", Separator: ",", Next: &st.DocTypesListCST{Name: "bar"}}}}}, &parse.Error{Offset: 22, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
diff --git a/internal/syntax/parse/testdata/TestString__tristruct_invalid_options.golden b/internal/syntax/parse/testdata/TestString__tristruct_invalid_options.golden
index f146f75..f9c3dbf 100644
--- a/internal/syntax/parse/testdata/TestString__tristruct_invalid_options.golden
+++ b/internal/syntax/parse/testdata/TestString__tristruct_invalid_options.golden
@@ -1,2 +1 @@
-[2]interface {
-}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
+[2]interface{}{&st.Query{}, &parse.Error{Offset: 14, Parsing: parse.NodeType(parse.NodeType)("OptionsLiteral"), Message: ": valid options are (wholeline, case), found multiline"}}
go fmt does nothing to handle very-long-lines, of which valast will often produce due to it being a generated AST.
gofumpt is a stricter version of gofmt, which does a much better job of formatting generated code than gofmt, and has in-progress work for formatting very-long-lines.
This PR changes the default
String
andStringOptions
output of valast to always use gofumpt formatting.