Skip to content

Commit 433377f

Browse files
committed
tests: update golden files
1 parent c1894ae commit 433377f

10 files changed

+17
-9
lines changed

testdata/golden/parser_default-options.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type MyLogLevel int
4040

4141
// MyStruct is a struct with exported and unexported fields.
4242
type MyStruct struct {
43-
ExportedField int // exported field.
43+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
4444
unexportedField string // unexported field.
4545
unexportedField1, unexportedField2 int // unexported shorthand fields.
4646
}

testdata/golden/parser_exclude-doc-comments.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type MyInterface interface {
2929
type MyLogLevel int
3030

3131
type MyStruct struct {
32-
ExportedField int
32+
ExportedField int `json:"exported,omitempty" xml:"exported"`
3333
unexportedField string
3434
unexportedField1, unexportedField2 int
3535
}

testdata/golden/parser_exclude-func-types.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type MyLogLevel int
3636

3737
// MyStruct is a struct with exported and unexported fields.
3838
type MyStruct struct {
39-
ExportedField int // exported field.
39+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
4040
unexportedField string // unexported field.
4141
unexportedField1, unexportedField2 int // unexported shorthand fields.
4242
}

testdata/golden/parser_exclude-funcs.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type MyLogLevel int
4040

4141
// MyStruct is a struct with exported and unexported fields.
4242
type MyStruct struct {
43-
ExportedField int // exported field.
43+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
4444
unexportedField string // unexported field.
4545
unexportedField1, unexportedField2 int // unexported shorthand fields.
4646
}

testdata/golden/parser_exclude-interfaces.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type MyLogLevel int
3535

3636
// MyStruct is a struct with exported and unexported fields.
3737
type MyStruct struct {
38-
ExportedField int // exported field.
38+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
3939
unexportedField string // unexported field.
4040
unexportedField1, unexportedField2 int // unexported shorthand fields.
4141
}

testdata/golden/parser_exclude-matching-idents.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type MyLogLevel int
4040

4141
// MyStruct is a struct with exported and unexported fields.
4242
type MyStruct struct {
43-
ExportedField int // exported field.
43+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
4444
unexportedField string // unexported field.
4545
unexportedField1, unexportedField2 int // unexported shorthand fields.
4646
}

testdata/golden/parser_exclude-unexported.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type MyLogLevel int
4040

4141
// MyStruct is a struct with exported and unexported fields.
4242
type MyStruct struct {
43-
ExportedField int // exported field.
43+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
4444
}
4545

4646
// MyMethod is a method associated with MyStruct.

testdata/golden/parser_full-doc-comments.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type MyLogLevel int
4040

4141
// MyStruct is a struct with exported and unexported fields.
4242
type MyStruct struct {
43-
ExportedField int // exported field.
43+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
4444
unexportedField string // unexported field.
4545
unexportedField1, unexportedField2 int // unexported shorthand fields.
4646
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package mypackage
2+
3+
// MyStruct is a struct with exported and unexported fields.
4+
type MyStruct struct {
5+
ExportedField int // exported field.
6+
unexportedField string // unexported field.
7+
unexportedField1, unexportedField2 int // unexported shorthand fields.
8+
}

testdata/source/default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func MyThirdFunction() MyFunctionType {
7878

7979
// MyStruct is a struct with exported and unexported fields.
8080
type MyStruct struct {
81-
ExportedField int // exported field.
81+
ExportedField int `json:"exported,omitempty" xml:"exported"` // exported field.
8282
unexportedField string // unexported field.
8383
unexportedField1, unexportedField2 int // unexported shorthand fields.
8484
}

0 commit comments

Comments
 (0)