Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/color_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions example/commented_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions example/example_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/replace_prefix_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/replace_prefix_int_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/sql_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/strings_only_enum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generator/.snapshots/Test118CustomPrefixExampleFile-1.18
Original file line number Diff line number Diff line change
Expand Up @@ -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) "",
Expand Down
28 changes: 14 additions & 14 deletions generator/.snapshots/Test118CustomPrefixExampleFile-og
Original file line number Diff line number Diff line change
Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down
2 changes: 1 addition & 1 deletion generator/.snapshots/Test118ExampleFile-1.18
Original file line number Diff line number Diff line change
Expand Up @@ -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) "",
Expand Down
28 changes: 14 additions & 14 deletions generator/.snapshots/Test118ExampleFile-og
Original file line number Diff line number Diff line change
Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down Expand Up @@ -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) "",
Expand Down
2 changes: 1 addition & 1 deletion generator/.snapshots/Test118ExampleFileMoreOptions-1.18
Original file line number Diff line number Diff line change
Expand Up @@ -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) "",
Expand Down
Loading
Loading