From d9a0bfe8927e8821df80180c58c2e373220c712d Mon Sep 17 00:00:00 2001 From: David Long Date: Fri, 18 Sep 2026 21:18:07 -0700 Subject: [PATCH] fix: use a value receiver for AppendText so generated enums pass recvcheck --- example/color_enum.go | 2 +- example/commented_enum.go | 4 +-- example/example_enum.go | 4 +-- example/replace_prefix_enum.go | 2 +- example/replace_prefix_int_enum.go | 2 +- example/sql_enum.go | 2 +- example/strings_only_enum.go | 2 +- .../Test118CustomPrefixExampleFile-1.18 | 2 +- .../Test118CustomPrefixExampleFile-og | 28 +++++++++---------- generator/.snapshots/Test118ExampleFile-1.18 | 2 +- generator/.snapshots/Test118ExampleFile-og | 28 +++++++++---------- .../Test118ExampleFileMoreOptions-1.18 | 2 +- .../Test118ExampleFileMoreOptions-og | 28 +++++++++---------- .../Test118NoPrefixExampleFile-1.18 | 2 +- .../.snapshots/Test118NoPrefixExampleFile-og | 28 +++++++++---------- ...18NoPrefixExampleFileWithSnakeToCamel-1.18 | 2 +- ...t118NoPrefixExampleFileWithSnakeToCamel-og | 28 +++++++++---------- .../.snapshots/TestCustomPrefixExampleFile | 28 +++++++++---------- generator/.snapshots/TestExampleFile | 28 +++++++++---------- .../.snapshots/TestExampleFileEmptyHeaders | 28 +++++++++---------- .../.snapshots/TestExampleFileMoreOptions | 28 +++++++++---------- .../TestExampleFileMoreOptionsWithForceUpper | 28 +++++++++---------- generator/.snapshots/TestNoIotaExampleFile | 28 +++++++++---------- .../.snapshots/TestNoIotaOnlyExampleFile | 2 +- generator/.snapshots/TestNoPrefixExampleFile | 28 +++++++++---------- .../TestNoPrefixExampleFileWithSnakeToCamel | 28 +++++++++---------- .../.snapshots/TestReplacePrefixExampleFile | 28 +++++++++---------- generator/enum.tmpl | 2 +- generator/enum_string.tmpl | 2 +- 29 files changed, 213 insertions(+), 213 deletions(-) diff --git a/example/color_enum.go b/example/color_enum.go index f57ac64..bc6af28 100644 --- a/example/color_enum.go +++ b/example/color_enum.go @@ -140,6 +140,6 @@ func (x *Color) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *Color) AppendText(b []byte) ([]byte, error) { +func (x Color) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/example/commented_enum.go b/example/commented_enum.go index 488f79d..62077d6 100644 --- a/example/commented_enum.go +++ b/example/commented_enum.go @@ -88,7 +88,7 @@ func (x *Commented) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *Commented) AppendText(b []byte) ([]byte, error) { +func (x Commented) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } @@ -168,6 +168,6 @@ func (x *ComplexCommented) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *ComplexCommented) AppendText(b []byte) ([]byte, error) { +func (x ComplexCommented) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/example/example_enum.go b/example/example_enum.go index b60b3a4..15b215f 100644 --- a/example/example_enum.go +++ b/example/example_enum.go @@ -187,7 +187,7 @@ func (x *Make) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *Make) AppendText(b []byte) ([]byte, error) { +func (x Make) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } @@ -326,7 +326,7 @@ func (x *NoZeros) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *NoZeros) AppendText(b []byte) ([]byte, error) { +func (x NoZeros) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/example/replace_prefix_enum.go b/example/replace_prefix_enum.go index 23fb885..461f0a4 100644 --- a/example/replace_prefix_enum.go +++ b/example/replace_prefix_enum.go @@ -83,6 +83,6 @@ func (x *Shop) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *Shop) AppendText(b []byte) ([]byte, error) { +func (x Shop) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/example/replace_prefix_int_enum.go b/example/replace_prefix_int_enum.go index 1681f68..a7b5c03 100644 --- a/example/replace_prefix_int_enum.go +++ b/example/replace_prefix_int_enum.go @@ -95,6 +95,6 @@ func (x *IntShop) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *IntShop) AppendText(b []byte) ([]byte, error) { +func (x IntShop) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/example/sql_enum.go b/example/sql_enum.go index 736a0a1..0ca0008 100644 --- a/example/sql_enum.go +++ b/example/sql_enum.go @@ -89,7 +89,7 @@ func (x *ProjectStatus) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *ProjectStatus) AppendText(b []byte) ([]byte, error) { +func (x ProjectStatus) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/example/strings_only_enum.go b/example/strings_only_enum.go index 9aeab16..ab702af 100644 --- a/example/strings_only_enum.go +++ b/example/strings_only_enum.go @@ -113,7 +113,7 @@ func (x *StrState) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *StrState) AppendText(b []byte) ([]byte, error) { +func (x StrState) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } diff --git a/generator/.snapshots/Test118CustomPrefixExampleFile-1.18 b/generator/.snapshots/Test118CustomPrefixExampleFile-1.18 index a75eafc..6bd1043 100644 --- a/generator/.snapshots/Test118CustomPrefixExampleFile-1.18 +++ b/generator/.snapshots/Test118CustomPrefixExampleFile-1.18 @@ -91,7 +91,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *ChangeType) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x ChangeType) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118CustomPrefixExampleFile-og b/generator/.snapshots/Test118CustomPrefixExampleFile-og index 271b324..7a30863 100644 --- a/generator/.snapshots/Test118CustomPrefixExampleFile-og +++ b/generator/.snapshots/Test118CustomPrefixExampleFile-og @@ -91,7 +91,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -370,7 +370,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -669,7 +669,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -969,7 +969,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1269,7 +1269,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1585,7 +1585,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1901,7 +1901,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2240,7 +2240,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2523,7 +2523,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2802,7 +2802,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3101,7 +3101,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3380,7 +3380,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3654,7 +3654,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3918,7 +3918,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118ExampleFile-1.18 b/generator/.snapshots/Test118ExampleFile-1.18 index 39dab9b..c49bc61 100644 --- a/generator/.snapshots/Test118ExampleFile-1.18 +++ b/generator/.snapshots/Test118ExampleFile-1.18 @@ -102,7 +102,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *ChangeType) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x ChangeType) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118ExampleFile-og b/generator/.snapshots/Test118ExampleFile-og index 6c6f7be..fd28e15 100644 --- a/generator/.snapshots/Test118ExampleFile-og +++ b/generator/.snapshots/Test118ExampleFile-og @@ -102,7 +102,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -267,7 +267,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -456,7 +456,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -646,7 +646,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -836,7 +836,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1045,7 +1045,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1253,7 +1253,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1490,7 +1490,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1659,7 +1659,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1824,7 +1824,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2013,7 +2013,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2178,7 +2178,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2337,7 +2337,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2487,7 +2487,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118ExampleFileMoreOptions-1.18 b/generator/.snapshots/Test118ExampleFileMoreOptions-1.18 index 693661d..c26252f 100644 --- a/generator/.snapshots/Test118ExampleFileMoreOptions-1.18 +++ b/generator/.snapshots/Test118ExampleFileMoreOptions-1.18 @@ -111,7 +111,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *ChangeType) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x ChangeType) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118ExampleFileMoreOptions-og b/generator/.snapshots/Test118ExampleFileMoreOptions-og index ca1beab..919acf3 100644 --- a/generator/.snapshots/Test118ExampleFileMoreOptions-og +++ b/generator/.snapshots/Test118ExampleFileMoreOptions-og @@ -111,7 +111,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -293,7 +293,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -499,7 +499,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -706,7 +706,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -913,7 +913,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1139,7 +1139,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1364,7 +1364,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1618,7 +1618,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1804,7 +1804,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1986,7 +1986,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2192,7 +2192,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2374,7 +2374,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2550,7 +2550,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2717,7 +2717,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118NoPrefixExampleFile-1.18 b/generator/.snapshots/Test118NoPrefixExampleFile-1.18 index 92a42b6..b4c68d1 100644 --- a/generator/.snapshots/Test118NoPrefixExampleFile-1.18 +++ b/generator/.snapshots/Test118NoPrefixExampleFile-1.18 @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *ChangeType) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x ChangeType) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118NoPrefixExampleFile-og b/generator/.snapshots/Test118NoPrefixExampleFile-og index 3b76824..f83d1ba 100644 --- a/generator/.snapshots/Test118NoPrefixExampleFile-og +++ b/generator/.snapshots/Test118NoPrefixExampleFile-og @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -176,7 +176,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -288,7 +288,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -401,7 +401,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -514,7 +514,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -643,7 +643,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -772,7 +772,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -924,7 +924,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1020,7 +1020,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1112,7 +1112,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1224,7 +1224,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1316,7 +1316,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1403,7 +1403,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1480,7 +1480,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-1.18 b/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-1.18 index 92a42b6..b4c68d1 100644 --- a/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-1.18 +++ b/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-1.18 @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *ChangeType) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x ChangeType) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-og b/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-og index e366cfc..83bcd11 100644 --- a/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-og +++ b/generator/.snapshots/Test118NoPrefixExampleFileWithSnakeToCamel-og @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -176,7 +176,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -288,7 +288,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -401,7 +401,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -514,7 +514,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -643,7 +643,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -772,7 +772,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -924,7 +924,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1020,7 +1020,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1112,7 +1112,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1224,7 +1224,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1316,7 +1316,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1403,7 +1403,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1480,7 +1480,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestCustomPrefixExampleFile b/generator/.snapshots/TestCustomPrefixExampleFile index 271b324..7a30863 100644 --- a/generator/.snapshots/TestCustomPrefixExampleFile +++ b/generator/.snapshots/TestCustomPrefixExampleFile @@ -91,7 +91,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -370,7 +370,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -669,7 +669,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -969,7 +969,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1269,7 +1269,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1585,7 +1585,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1901,7 +1901,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2240,7 +2240,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2523,7 +2523,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2802,7 +2802,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3101,7 +3101,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3380,7 +3380,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3654,7 +3654,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -3918,7 +3918,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestExampleFile b/generator/.snapshots/TestExampleFile index 6c6f7be..fd28e15 100644 --- a/generator/.snapshots/TestExampleFile +++ b/generator/.snapshots/TestExampleFile @@ -102,7 +102,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -267,7 +267,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -456,7 +456,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -646,7 +646,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -836,7 +836,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1045,7 +1045,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1253,7 +1253,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1490,7 +1490,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1659,7 +1659,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1824,7 +1824,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2013,7 +2013,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2178,7 +2178,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2337,7 +2337,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2487,7 +2487,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestExampleFileEmptyHeaders b/generator/.snapshots/TestExampleFileEmptyHeaders index c8beaab..37f1c01 100644 --- a/generator/.snapshots/TestExampleFileEmptyHeaders +++ b/generator/.snapshots/TestExampleFileEmptyHeaders @@ -98,7 +98,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -263,7 +263,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -452,7 +452,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -642,7 +642,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -832,7 +832,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1041,7 +1041,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1249,7 +1249,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1486,7 +1486,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1655,7 +1655,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1820,7 +1820,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2009,7 +2009,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2174,7 +2174,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2333,7 +2333,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2483,7 +2483,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestExampleFileMoreOptions b/generator/.snapshots/TestExampleFileMoreOptions index ca1beab..919acf3 100644 --- a/generator/.snapshots/TestExampleFileMoreOptions +++ b/generator/.snapshots/TestExampleFileMoreOptions @@ -111,7 +111,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -293,7 +293,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -499,7 +499,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -706,7 +706,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -913,7 +913,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1139,7 +1139,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1364,7 +1364,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1618,7 +1618,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1804,7 +1804,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1986,7 +1986,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2192,7 +2192,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2374,7 +2374,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2550,7 +2550,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2717,7 +2717,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestExampleFileMoreOptionsWithForceUpper b/generator/.snapshots/TestExampleFileMoreOptionsWithForceUpper index 3124f14..d31448c 100644 --- a/generator/.snapshots/TestExampleFileMoreOptionsWithForceUpper +++ b/generator/.snapshots/TestExampleFileMoreOptionsWithForceUpper @@ -104,7 +104,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -279,7 +279,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -474,7 +474,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -670,7 +670,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -866,7 +866,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1078,7 +1078,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1290,7 +1290,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1525,7 +1525,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1704,7 +1704,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1879,7 +1879,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2074,7 +2074,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2249,7 +2249,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2419,7 +2419,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -2582,7 +2582,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestNoIotaExampleFile b/generator/.snapshots/TestNoIotaExampleFile index 69aeb2e..f3de194 100644 --- a/generator/.snapshots/TestNoIotaExampleFile +++ b/generator/.snapshots/TestNoIotaExampleFile @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -176,7 +176,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -288,7 +288,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -401,7 +401,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -514,7 +514,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -643,7 +643,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -772,7 +772,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -924,7 +924,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1020,7 +1020,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1112,7 +1112,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1224,7 +1224,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1316,7 +1316,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1403,7 +1403,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1480,7 +1480,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestNoIotaOnlyExampleFile b/generator/.snapshots/TestNoIotaOnlyExampleFile index e2d405e..7274ff9 100644 --- a/generator/.snapshots/TestNoIotaOnlyExampleFile +++ b/generator/.snapshots/TestNoIotaOnlyExampleFile @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Buggy) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Buggy) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestNoPrefixExampleFile b/generator/.snapshots/TestNoPrefixExampleFile index 3b76824..f83d1ba 100644 --- a/generator/.snapshots/TestNoPrefixExampleFile +++ b/generator/.snapshots/TestNoPrefixExampleFile @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -176,7 +176,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -288,7 +288,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -401,7 +401,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -514,7 +514,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -643,7 +643,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -772,7 +772,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -924,7 +924,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1020,7 +1020,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1112,7 +1112,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1224,7 +1224,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1316,7 +1316,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1403,7 +1403,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1480,7 +1480,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestNoPrefixExampleFileWithSnakeToCamel b/generator/.snapshots/TestNoPrefixExampleFileWithSnakeToCamel index e366cfc..83bcd11 100644 --- a/generator/.snapshots/TestNoPrefixExampleFileWithSnakeToCamel +++ b/generator/.snapshots/TestNoPrefixExampleFileWithSnakeToCamel @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -176,7 +176,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -288,7 +288,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -401,7 +401,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -514,7 +514,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -643,7 +643,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -772,7 +772,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -924,7 +924,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1020,7 +1020,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1112,7 +1112,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1224,7 +1224,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1316,7 +1316,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1403,7 +1403,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1480,7 +1480,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/.snapshots/TestReplacePrefixExampleFile b/generator/.snapshots/TestReplacePrefixExampleFile index 0cb76a6..aa20cd3 100644 --- a/generator/.snapshots/TestReplacePrefixExampleFile +++ b/generator/.snapshots/TestReplacePrefixExampleFile @@ -84,7 +84,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=55) "func (x *Animal) AppendText(b []byte) ([]byte, error) {", + (string) (len=54) "func (x Animal) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -176,7 +176,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Cases) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Cases) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -288,7 +288,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Color) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Color) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -401,7 +401,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=65) "func (x *ColorWithComment) AppendText(b []byte) ([]byte, error) {", + (string) (len=64) "func (x ColorWithComment) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -514,7 +514,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment2) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment2) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -643,7 +643,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment3) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment3) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -772,7 +772,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=66) "func (x *ColorWithComment4) AppendText(b []byte) ([]byte, error) {", + (string) (len=65) "func (x ColorWithComment4) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -924,7 +924,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=58) "func (x *Enum64bit) AppendText(b []byte) ([]byte, error) {", + (string) (len=57) "func (x Enum64bit) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1020,7 +1020,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=54) "func (x *Model) AppendText(b []byte) ([]byte, error) {", + (string) (len=53) "func (x Model) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1112,7 +1112,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=57) "func (x *NonASCII) AppendText(b []byte) ([]byte, error) {", + (string) (len=56) "func (x NonASCII) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1224,7 +1224,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *Sanitizing) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x Sanitizing) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1316,7 +1316,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=53) "func (x *Soda) AppendText(b []byte) ([]byte, error) {", + (string) (len=52) "func (x Soda) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1403,7 +1403,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=61) "func (x *StartNotZero) AppendText(b []byte) ([]byte, error) {", + (string) (len=60) "func (x StartNotZero) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", @@ -1480,7 +1480,7 @@ (string) (len=74) "// (allocating a larger slice if necessary) and returns the updated slice.", (string) (len=2) "//", (string) (len=77) "// Implementations must not retain b, nor mutate any bytes within b[:len(b)].", - (string) (len=59) "func (x *StringEnum) AppendText(b []byte) ([]byte, error) {", + (string) (len=58) "func (x StringEnum) AppendText(b []byte) ([]byte, error) {", (string) (len=37) "\treturn append(b, x.String()...), nil", (string) (len=1) "}", (string) "", diff --git a/generator/enum.tmpl b/generator/enum.tmpl index 8d214a5..43b13c3 100644 --- a/generator/enum.tmpl +++ b/generator/enum.tmpl @@ -117,7 +117,7 @@ func (x *{{.enum.Name}}) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *{{.enum.Name}}) AppendText(b []byte) ([]byte, error) { +func (x {{.enum.Name}}) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } {{end}} diff --git a/generator/enum_string.tmpl b/generator/enum_string.tmpl index ee929d3..ebb2ec0 100644 --- a/generator/enum_string.tmpl +++ b/generator/enum_string.tmpl @@ -113,7 +113,7 @@ func (x *{{.enum.Name}}) UnmarshalText(text []byte) error { // (allocating a larger slice if necessary) and returns the updated slice. // // Implementations must not retain b, nor mutate any bytes within b[:len(b)]. -func (x *{{.enum.Name}}) AppendText(b []byte) ([]byte, error) { +func (x {{.enum.Name}}) AppendText(b []byte) ([]byte, error) { return append(b, x.String()...), nil } {{end}}