Kaynağa Gözat

fix golint: do not export test types

Tao Wen 8 yıl önce
ebeveyn
işleme
3b6853d209
61 değiştirilmiş dosya ile 214 ekleme ve 153 silme
  1. 2 2
      output_tests/array/struct_empty_alias/types.go
  2. 4 4
      output_tests/json_marshal/struct_alias/types.go
  3. 4 4
      output_tests/json_marshal/struct_field_alias/types.go
  4. 2 2
      output_tests/map/string/ptr_struct_various/types.go
  5. 2 2
      output_tests/map/string/string_alias/types.go
  6. 2 2
      output_tests/map/string/struct_empty_alias/types.go
  7. 2 2
      output_tests/map/string_alias/string/types.go
  8. 2 2
      output_tests/map/string_alias/string_alias/types.go
  9. 7 7
      output_tests/map_key_text_marshal/string_alias/types.go
  10. 6 6
      output_tests/map_key_text_marshal/struct/types.go
  11. 2 2
      output_tests/slice/struct_empty_alias/types.go
  12. 2 2
      output_tests/struct/alias/types.go
  13. 1 0
      output_tests/struct/anonymous/no_overlap/float64/types.go
  14. 1 0
      output_tests/struct/anonymous/no_overlap/int32/types.go
  15. 1 0
      output_tests/struct/anonymous/no_overlap/map_string_string/types.go
  16. 1 0
      output_tests/struct/anonymous/no_overlap/ptr_float64/types.go
  17. 1 0
      output_tests/struct/anonymous/no_overlap/ptr_int32/types.go
  18. 1 0
      output_tests/struct/anonymous/no_overlap/ptr_map_string_string/types.go
  19. 1 0
      output_tests/struct/anonymous/no_overlap/ptr_slice_string/types.go
  20. 1 0
      output_tests/struct/anonymous/no_overlap/ptr_string/types.go
  21. 1 0
      output_tests/struct/anonymous/no_overlap/ptr_struct_various/types.go
  22. 1 0
      output_tests/struct/anonymous/no_overlap/slice_string/types.go
  23. 1 0
      output_tests/struct/anonymous/no_overlap/string/types.go
  24. 1 0
      output_tests/struct/anonymous/no_overlap/string_with_tag/types.go
  25. 1 0
      output_tests/struct/anonymous/no_overlap/struct_various/types.go
  26. 2 0
      output_tests/struct/anonymous/overlap/different_levels/types.go
  27. 10 7
      output_tests/struct/anonymous/overlap/ignore_deeper_level/types.go
  28. 6 4
      output_tests/struct/anonymous/overlap/same_level_1_both_tagged/types.go
  29. 6 4
      output_tests/struct/anonymous/overlap/same_level_1_no_tags/types.go
  30. 6 4
      output_tests/struct/anonymous/overlap/same_level_1_tagged/types.go
  31. 8 4
      output_tests/struct/anonymous/overlap/same_level_2_both_tagged/types.go
  32. 8 4
      output_tests/struct/anonymous/overlap/same_level_2_no_tags/types.go
  33. 8 4
      output_tests/struct/anonymous/overlap/same_level_2_tagged/types.go
  34. 4 4
      output_tests/struct/array/string_alias/types.go
  35. 2 2
      output_tests/struct/empty_alias/types.go
  36. 2 2
      output_tests/struct/float64_alias/types.go
  37. 4 4
      output_tests/struct/float64s_alias/types.go
  38. 2 2
      output_tests/struct/int32_alias/types.go
  39. 4 4
      output_tests/struct/int32s_alias/types.go
  40. 5 5
      output_tests/struct/ptr_float64_alias/types.go
  41. 6 5
      output_tests/struct/ptr_int32_alias/types.go
  42. 5 5
      output_tests/struct/ptr_string_alias/types.go
  43. 4 4
      output_tests/struct/slice/string_alias/types.go
  44. 2 2
      output_tests/struct/string_alias/types.go
  45. 4 4
      output_tests/struct/strings_alias/types.go
  46. 2 2
      output_tests/struct/struct/empty_alias/types.go
  47. 2 2
      output_tests/struct/struct/float64_alias/types.go
  48. 6 6
      output_tests/struct/struct/strings_alias/types.go
  49. 11 0
      output_tests/struct_tags/fieldname/embedded/types.go
  50. 1 0
      output_tests/struct_tags/fieldname/string/types.go
  51. 11 0
      output_tests/struct_tags/fieldname/struct/types.go
  52. 1 0
      output_tests/struct_tags/omitempty/embedded/types.go
  53. 4 4
      output_tests/struct_tags/omitempty/ptr_string_json_marshal/types.go
  54. 4 4
      output_tests/struct_tags/omitempty/ptr_string_text_marshal/types.go
  55. 4 4
      output_tests/struct_tags/omitempty/ptr_struct_json_marshal/types.go
  56. 4 4
      output_tests/struct_tags/omitempty/ptr_struct_text_marshal/types.go
  57. 4 4
      output_tests/struct_tags/omitempty/string_text_marshal/types.go
  58. 4 4
      output_tests/struct_tags/omitempty/struct_json_marshal/types.go
  59. 4 4
      output_tests/struct_tags/omitempty/struct_text_marshal/types.go
  60. 2 2
      output_tests/text_marshal/struct_alias/types.go
  61. 2 2
      output_tests/text_marshal/struct_field_alias/types.go

+ 2 - 2
output_tests/array/struct_empty_alias/types.go

@@ -1,5 +1,5 @@
 package test
 
-type A struct{}
+type typeA struct{}
 
-type typeForTest [4]A
+type typeForTest [4]typeA

+ 4 - 4
output_tests/json_marshal/struct_alias/types.go

@@ -46,9 +46,9 @@ func (m *marshalerForTest) UnmarshalJSON(text []byte) error {
 	return nil
 }
 
-var _ json.Marshaler = Marshaler{}
-var _ json.Unmarshaler = &Marshaler{}
+var _ json.Marshaler = marshalerForTest{}
+var _ json.Unmarshaler = &marshalerForTest{}
 
-type A Marshaler
+type typeA marshalerForTest
 
-type typeForTest A
+type typeForTest typeA

+ 4 - 4
output_tests/json_marshal/struct_field_alias/types.go

@@ -46,13 +46,13 @@ func (m *marshalerForTest) UnmarshalJSON(text []byte) error {
 	return nil
 }
 
-var _ json.Marshaler = Marshaler{}
-var _ json.Unmarshaler = &Marshaler{}
+var _ json.Marshaler = marshalerForTest{}
+var _ json.Unmarshaler = &marshalerForTest{}
 
-type A Marshaler
+type typeA marshalerForTest
 
 type typeForTest struct {
 	S string
-	M A
+	M typeA
 	I int8
 }

+ 2 - 2
output_tests/map/string/ptr_struct_various/types.go

@@ -1,6 +1,6 @@
 package test
 
-type Struct struct {
+type typeA struct {
 	String string
 	Int    int32
 	Float  float64
@@ -11,4 +11,4 @@ type Struct struct {
 	Map   map[string]string
 }
 
-type typeForTest map[string]*Struct
+type typeForTest map[string]*typeA

+ 2 - 2
output_tests/map/string/string_alias/types.go

@@ -1,5 +1,5 @@
 package test
 
-type StringAlias string
+type stringAlias string
 
-type typeForTest map[string]StringAlias
+type typeForTest map[string]stringAlias

+ 2 - 2
output_tests/map/string/struct_empty_alias/types.go

@@ -1,5 +1,5 @@
 package test
 
-type A struct{}
+type typeA struct{}
 
-type typeForTest map[string]A
+type typeForTest map[string]typeA

+ 2 - 2
output_tests/map/string_alias/string/types.go

@@ -1,5 +1,5 @@
 package test
 
-type StringAlias string
+type stringAlias string
 
-type typeForTest map[StringAlias]string
+type typeForTest map[stringAlias]string

+ 2 - 2
output_tests/map/string_alias/string_alias/types.go

@@ -1,5 +1,5 @@
 package test
 
-type StringAlias string
+type stringAlias string
 
-type typeForTest map[StringAlias]StringAlias
+type typeForTest map[stringAlias]stringAlias

+ 7 - 7
output_tests/map_key_text_marshal/string_alias/types.go

@@ -5,18 +5,18 @@ import (
 	"strings"
 )
 
-type KeyType string
+type keyType string
 
-func (k KeyType) MarshalText() ([]byte, error) {
+func (k keyType) MarshalText() ([]byte, error) {
 	return []byte("MANUAL__" + k), nil
 }
 
-func (k *KeyType) UnmarshalText(text []byte) error {
-	*k = KeyType(strings.TrimPrefix(string(text), "MANUAL__"))
+func (k *keyType) UnmarshalText(text []byte) error {
+	*k = keyType(strings.TrimPrefix(string(text), "MANUAL__"))
 	return nil
 }
 
-var _ encoding.TextMarshaler = KeyType("")
-var _ encoding.TextUnmarshaler = new(KeyType)
+var _ encoding.TextMarshaler = keyType("")
+var _ encoding.TextUnmarshaler = new(keyType)
 
-type typeForTest map[KeyType]string
+type typeForTest map[keyType]string

+ 6 - 6
output_tests/map_key_text_marshal/struct/types.go

@@ -5,20 +5,20 @@ import (
 	"strings"
 )
 
-type KeyType struct {
+type keyType struct {
 	X string
 }
 
-func (k KeyType) MarshalText() ([]byte, error) {
+func (k keyType) MarshalText() ([]byte, error) {
 	return []byte("MANUAL__" + k.X), nil
 }
 
-func (k *KeyType) UnmarshalText(text []byte) error {
+func (k *keyType) UnmarshalText(text []byte) error {
 	k.X = strings.TrimPrefix(string(text), "MANUAL__")
 	return nil
 }
 
-var _ encoding.TextMarshaler = KeyType{}
-var _ encoding.TextUnmarshaler = &KeyType{}
+var _ encoding.TextMarshaler = keyType{}
+var _ encoding.TextUnmarshaler = &keyType{}
 
-type typeForTest map[KeyType]string
+type typeForTest map[keyType]string

+ 2 - 2
output_tests/slice/struct_empty_alias/types.go

@@ -1,5 +1,5 @@
 package test
 
-type A struct{}
+type typeA struct{}
 
-type typeForTest []A
+type typeForTest []typeA

+ 2 - 2
output_tests/struct/alias/types.go

@@ -1,6 +1,6 @@
 package test
 
-type A struct {
+type typeA struct {
 	Byte1   byte
 	Byte2   byte
 	Bool1   bool
@@ -17,4 +17,4 @@ type A struct {
 	String2 string
 }
 
-type typeForTest A
+type typeForTest typeA

+ 1 - 0
output_tests/struct/anonymous/no_overlap/float64/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded float64
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/int32/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded int32
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/map_string_string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded map[string]string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/ptr_float64/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded float64
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/ptr_int32/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded int32
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/ptr_map_string_string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded map[string]string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/ptr_slice_string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded []string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/ptr_string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/ptr_struct_various/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded struct {
 	String string
 	Int    int32

+ 1 - 0
output_tests/struct/anonymous/no_overlap/slice_string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded []string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/string_with_tag/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded string
 
 type typeForTest struct {

+ 1 - 0
output_tests/struct/anonymous/no_overlap/struct_various/types.go

@@ -1,5 +1,6 @@
 package test
 
+// Embedded TEST ONLY
 type Embedded struct {
 	String string
 	Int    int32

+ 2 - 0
output_tests/struct/anonymous/overlap/different_levels/types.go

@@ -1,9 +1,11 @@
 package test
 
+// E1 TEST ONLY
 type E1 struct {
 	F1 int32
 }
 
+// E2 TEST ONLY
 type E2 struct {
 	F2 string
 }

+ 10 - 7
output_tests/struct/anonymous/overlap/ignore_deeper_level/types.go

@@ -1,20 +1,23 @@
 package test
 
-type doubleEmbedded struct {
+// DoubleEmbedded TEST ONLY
+type DoubleEmbedded struct {
 	F1 int32 `json:"F1"`
 }
 
-type embedded1 struct {
-	doubleEmbedded
+// Embedded1 TEST ONLY
+type Embedded1 struct {
+	DoubleEmbedded
 	F1 int32
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	F1 int32 `json:"F1"`
-	doubleEmbedded
+	DoubleEmbedded
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 6 - 4
output_tests/struct/anonymous/overlap/same_level_1_both_tagged/types.go

@@ -1,14 +1,16 @@
 package test
 
-type embedded1 struct {
+// Embedded1 TEST ONLY
+type Embedded1 struct {
 	F1 int32 `json:"F1"`
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	F1 int32 `json:"F1"`
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 6 - 4
output_tests/struct/anonymous/overlap/same_level_1_no_tags/types.go

@@ -1,14 +1,16 @@
 package test
 
-type embedded1 struct {
+// Embedded1 TEST ONLY
+type Embedded1 struct {
 	F1 int32
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	F1 int32
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 6 - 4
output_tests/struct/anonymous/overlap/same_level_1_tagged/types.go

@@ -1,14 +1,16 @@
 package test
 
-type embedded1 struct {
+// Embedded1 TEST ONLY
+type Embedded1 struct {
 	F1 int32
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	F1 int32 `json:"F1"`
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 8 - 4
output_tests/struct/anonymous/overlap/same_level_2_both_tagged/types.go

@@ -1,22 +1,26 @@
 package test
 
+// DoubleEmbedded1 TEST ONLY
 type DoubleEmbedded1 struct {
 	F1 int32 `json:"F1"`
 }
 
-type embedded1 struct {
+// Embedded1 TEST ONLY
+type Embedded1 struct {
 	DoubleEmbedded1
 }
 
+// DoubleEmbedded2 TEST ONLY
 type DoubleEmbedded2 struct {
 	F1 int32 `json:"F1"`
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	DoubleEmbedded2
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 8 - 4
output_tests/struct/anonymous/overlap/same_level_2_no_tags/types.go

@@ -1,22 +1,26 @@
 package test
 
+// DoubleEmbedded1 TEST ONLY
 type DoubleEmbedded1 struct {
 	F1 int32
 }
 
-type embedded1 struct {
+// Embedded1 TEST ONLY
+type Embedded1 struct {
 	DoubleEmbedded1
 }
 
+// DoubleEmbedded2 TEST ONLY
 type DoubleEmbedded2 struct {
 	F1 int32
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	DoubleEmbedded2
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 8 - 4
output_tests/struct/anonymous/overlap/same_level_2_tagged/types.go

@@ -1,22 +1,26 @@
 package test
 
+// DoubleEmbedded1 TEST ONLY
 type DoubleEmbedded1 struct {
 	F1 int32
 }
 
-type embedded1 struct {
+// Embedded1 TEST ONLY
+type Embedded1 struct {
 	DoubleEmbedded1
 }
 
+// DoubleEmbedded2 TEST ONLY
 type DoubleEmbedded2 struct {
 	F1 int32 `json:"F1"`
 }
 
-type embedded2 struct {
+// Embedded2 TEST ONLY
+type Embedded2 struct {
 	DoubleEmbedded2
 }
 
 type typeForTest struct {
-	embedded1
-	embedded2
+	Embedded1
+	Embedded2
 }

+ 4 - 4
output_tests/struct/array/string_alias/types.go

@@ -1,9 +1,9 @@
 package test
 
-type A1 string
-type A2 [4]A1
+type typeA1 string
+type typeA2 [4]typeA1
 
 type typeForTest struct {
-	F1 [4]A1
-	F2 A2
+	F1 [4]typeA1
+	F2 typeA2
 }

+ 2 - 2
output_tests/struct/empty_alias/types.go

@@ -1,5 +1,5 @@
 package test
 
-type A struct{}
+type typeA struct{}
 
-type typeForTest A
+type typeForTest typeA

+ 2 - 2
output_tests/struct/float64_alias/types.go

@@ -1,7 +1,7 @@
 package test
 
-type A float64
+type typeA float64
 
 type typeForTest struct {
-	F A
+	F typeA
 }

+ 4 - 4
output_tests/struct/float64s_alias/types.go

@@ -1,9 +1,9 @@
 package test
 
-type A float64
+type typeA float64
 
 type typeForTest struct {
-	F1 A
-	F2 A
-	F3 A
+	F1 typeA
+	F2 typeA
+	F3 typeA
 }

+ 2 - 2
output_tests/struct/int32_alias/types.go

@@ -1,7 +1,7 @@
 package test
 
-type A int32
+type typeA int32
 
 type typeForTest struct {
-	F A
+	F typeA
 }

+ 4 - 4
output_tests/struct/int32s_alias/types.go

@@ -1,9 +1,9 @@
 package test
 
-type A int32
+type typeA int32
 
 type typeForTest struct {
-	F1 A
-	F2 A
-	F3 A
+	F1 typeA
+	F2 typeA
+	F3 typeA
 }

+ 5 - 5
output_tests/struct/ptr_float64_alias/types.go

@@ -1,10 +1,10 @@
 package test
 
-type A1 float64
-type A2 *float64
+type typeA1 float64
+type typeA2 *float64
 
 type typeForTest struct {
-	F1 *A1
-	F2 A2
-	F3 *A2
+	F1 *typeA1
+	F2 typeA2
+	F3 *typeA2
 }

+ 6 - 5
output_tests/struct/ptr_int32_alias/types.go

@@ -1,10 +1,11 @@
 package test
 
-type A1 int32
-type A2 *int32
+type typeA1 int32
+
+type typeA2 *int32
 
 type typeForTest struct {
-	F1 *A1
-	F2 A2
-	F3 *A2
+	F1 *typeA1
+	F2 typeA2
+	F3 *typeA2
 }

+ 5 - 5
output_tests/struct/ptr_string_alias/types.go

@@ -1,10 +1,10 @@
 package test
 
-type A1 string
-type A2 *string
+type typeA1 string
+type typeA2 *string
 
 type typeForTest struct {
-	F1 *A1
-	F2 A2
-	F3 *A2
+	F1 *typeA1
+	F2 typeA2
+	F3 *typeA2
 }

+ 4 - 4
output_tests/struct/slice/string_alias/types.go

@@ -1,9 +1,9 @@
 package test
 
-type A1 string
-type A2 []A1
+type typeA1 string
+type typeA2 []typeA1
 
 type typeForTest struct {
-	F1 []A1
-	F2 A2
+	F1 []typeA1
+	F2 typeA2
 }

+ 2 - 2
output_tests/struct/string_alias/types.go

@@ -1,7 +1,7 @@
 package test
 
-type A string
+type typeA string
 
 type typeForTest struct {
-	F A
+	F typeA
 }

+ 4 - 4
output_tests/struct/strings_alias/types.go

@@ -1,9 +1,9 @@
 package test
 
-type A string
+type typeA string
 
 type typeForTest struct {
-	F1 A
-	F2 A
-	F3 A
+	F1 typeA
+	F2 typeA
+	F3 typeA
 }

+ 2 - 2
output_tests/struct/struct/empty_alias/types.go

@@ -1,7 +1,7 @@
 package test
 
-type A struct{}
+type typeA struct{}
 
 type typeForTest struct {
-	F A
+	F typeA
 }

+ 2 - 2
output_tests/struct/struct/float64_alias/types.go

@@ -1,9 +1,9 @@
 package test
 
-type A struct {
+type typeA struct {
 	F float64
 }
 
 type typeForTest struct {
-	F A
+	F typeA
 }

+ 6 - 6
output_tests/struct/struct/strings_alias/types.go

@@ -1,13 +1,13 @@
 package test
 
-type S string
+type typeS string
 
-type A struct {
-	F1 S
-	F2 S
-	F3 S
+type typeA struct {
+	F1 typeS
+	F2 typeS
+	F3 typeS
 }
 
 type typeForTest struct {
-	F A
+	F typeA
 }

+ 11 - 0
output_tests/struct_tags/fieldname/embedded/types.go

@@ -1,20 +1,31 @@
 package test
 
+// S1 TEST ONLY
 type S1 struct {
 	S1F string
 }
+
+// S2 TEST ONLY
 type S2 struct {
 	S2F string
 }
+
+// S3 TEST ONLY
 type S3 struct {
 	S3F string
 }
+
+// S4 TEST ONLY
 type S4 struct {
 	S4F string
 }
+
+// S5 TEST ONLY
 type S5 struct {
 	S5F string
 }
+
+// S6 TEST ONLY
 type S6 struct {
 	S6F string
 }

+ 1 - 0
output_tests/struct_tags/fieldname/string/types.go

@@ -1,5 +1,6 @@
 package test
 
+// E TEST ONLY
 type E struct {
 	E1 string
 }

+ 11 - 0
output_tests/struct_tags/fieldname/struct/types.go

@@ -1,20 +1,31 @@
 package test
 
+// S1 TEST ONLY
 type S1 struct {
 	S1F string
 }
+
+// S2 TEST ONLY
 type S2 struct {
 	S2F string
 }
+
+// S3 TEST ONLY
 type S3 struct {
 	S3F string
 }
+
+// S4 TEST ONLY
 type S4 struct {
 	S4F string
 }
+
+// S5 TEST ONLY
 type S5 struct {
 	S5F string
 }
+
+// S6 TEST ONLY
 type S6 struct {
 	S6F string
 }

+ 1 - 0
output_tests/struct_tags/omitempty/embedded/types.go

@@ -1,5 +1,6 @@
 package test
 
+// E TEST ONLY
 type E struct {
 	F string `json:"F,omitempty"`
 }

+ 4 - 4
output_tests/struct_tags/omitempty/ptr_string_json_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F *JM `json:"f,omitempty"`
+	F *jm `json:"f,omitempty"`
 }
 
-type JM string
+type jm string
 
-func (t *JM) UnmarshalJSON(b []byte) error {
+func (t *jm) UnmarshalJSON(b []byte) error {
 	return nil
 }
 
-func (t JM) MarshalJSON() ([]byte, error) {
+func (t jm) MarshalJSON() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 4 - 4
output_tests/struct_tags/omitempty/ptr_string_text_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F *TM `json:"f,omitempty"`
+	F *tm `json:"f,omitempty"`
 }
 
-type TM string
+type tm string
 
-func (t *TM) UnmarshalText(b []byte) error {
+func (t *tm) UnmarshalText(b []byte) error {
 	return nil
 }
 
-func (t TM) MarshalText() ([]byte, error) {
+func (t tm) MarshalText() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 4 - 4
output_tests/struct_tags/omitempty/ptr_struct_json_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F *JM `json:"f,omitempty"`
+	F *jm `json:"f,omitempty"`
 }
 
-type JM struct{}
+type jm struct{}
 
-func (t *JM) UnmarshalJSON(b []byte) error {
+func (t *jm) UnmarshalJSON(b []byte) error {
 	return nil
 }
 
-func (t JM) MarshalJSON() ([]byte, error) {
+func (t jm) MarshalJSON() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 4 - 4
output_tests/struct_tags/omitempty/ptr_struct_text_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F *TM `json:"f,omitempty"`
+	F *tm `json:"f,omitempty"`
 }
 
-type TM struct{}
+type tm struct{}
 
-func (t *TM) UnmarshalText(b []byte) error {
+func (t *tm) UnmarshalText(b []byte) error {
 	return nil
 }
 
-func (t TM) MarshalText() ([]byte, error) {
+func (t tm) MarshalText() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 4 - 4
output_tests/struct_tags/omitempty/string_text_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F TM `json:"f,omitempty"`
+	F tm `json:"f,omitempty"`
 }
 
-type TM string
+type tm string
 
-func (t *TM) UnmarshalText(b []byte) error {
+func (t *tm) UnmarshalText(b []byte) error {
 	return nil
 }
 
-func (t TM) MarshalText() ([]byte, error) {
+func (t tm) MarshalText() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 4 - 4
output_tests/struct_tags/omitempty/struct_json_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F JM `json:"f,omitempty"`
+	F jm `json:"f,omitempty"`
 }
 
-type JM struct{}
+type jm struct{}
 
-func (t *JM) UnmarshalJSON(b []byte) error {
+func (t *jm) UnmarshalJSON(b []byte) error {
 	return nil
 }
 
-func (t JM) MarshalJSON() ([]byte, error) {
+func (t jm) MarshalJSON() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 4 - 4
output_tests/struct_tags/omitempty/struct_text_marshal/types.go

@@ -1,15 +1,15 @@
 package test
 
 type typeForTest struct {
-	F TM `json:"f,omitempty"`
+	F tm `json:"f,omitempty"`
 }
 
-type TM struct{}
+type tm struct{}
 
-func (t *TM) UnmarshalText(b []byte) error {
+func (t *tm) UnmarshalText(b []byte) error {
 	return nil
 }
 
-func (t TM) MarshalText() ([]byte, error) {
+func (t tm) MarshalText() ([]byte, error) {
 	return []byte(`""`), nil
 }

+ 2 - 2
output_tests/text_marshal/struct_alias/types.go

@@ -49,6 +49,6 @@ func (m *marshalerForTest) UnmarshalText(text []byte) error {
 var _ encoding.TextMarshaler = marshalerForTest{}
 var _ encoding.TextUnmarshaler = &marshalerForTest{}
 
-type A marshalerForTest
+type marshalerAlias marshalerForTest
 
-type typeForTest A
+type typeForTest marshalerAlias

+ 2 - 2
output_tests/text_marshal/struct_field_alias/types.go

@@ -49,10 +49,10 @@ func (m *marshalerForTest) UnmarshalText(text []byte) error {
 var _ encoding.TextMarshaler = marshalerForTest{}
 var _ encoding.TextUnmarshaler = &marshalerForTest{}
 
-type A marshalerForTest
+type marshalerAlias marshalerForTest
 
 type typeForTest struct {
 	S string
-	M A
+	M marshalerAlias
 	I int8
 }