Skip to content

Commit

Permalink
chore: update snapshots after several Go codegen fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaka91 committed Jan 11, 2024
1 parent 625202e commit b38e1ca
Show file tree
Hide file tree
Showing 27 changed files with 357 additions and 342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/alias_basic.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

// Sample type alias.
type Sample uint32

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/attribute_multi.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type Sample struct{}

func NewSample() Sample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/attribute_single.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type Sample struct{}

func NewSample() Sample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/attribute_unit.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type Sample struct{}

func NewSample() Sample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/attributes.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type Sample struct{}

func NewSample() Sample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/attributes_min_ws.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type Sample struct{}

func NewSample() Sample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/const_basic.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

const BoolTrue bool = true
const BoolFalse bool = false
const Int uint32 = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/const_string.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

const Simple string = "value"
const NewlineEscape string = "one two three"
const Escapes string = "escape basics \r\n \t \u{8} \u{c} \\ \"hello\" \nunicode ❤ emoji ❤ "
Expand Down
24 changes: 12 additions & 12 deletions crates/mabo-go/tests/snapshots/render__render@enum_basic.mabo.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/enum_basic.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type SampleVariant interface {
sealed()
}
Expand Down Expand Up @@ -131,14 +131,14 @@ func (v *Sample_Two) Decode(r []byte) ([]byte, error) {

if !foundN0 {
return nil, buf.MissingFieldError{
ID: 1
Field: ""
ID: 1,
Field: "",
}
}
if !foundN1 {
return nil, buf.MissingFieldError{
ID: 2
Field: ""
ID: 2,
Field: "",
}
}

Expand Down Expand Up @@ -227,14 +227,14 @@ func (v *Sample_Three) Decode(r []byte) ([]byte, error) {

if !foundField1 {
return nil, buf.MissingFieldError{
ID: 1
Field: "field1"
ID: 1,
Field: "field1",
}
}
if !foundField2 {
return nil, buf.MissingFieldError{
ID: 2
Field: "field2"
ID: 2,
Field: "field2",
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/enum_generics.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type SampleVariant interface {
sealed()
}
Expand Down Expand Up @@ -138,14 +138,14 @@ func (v *Sample_Two[A, B]) Decode(r []byte) ([]byte, error) {

if !foundN0 {
return nil, buf.MissingFieldError{
ID: 1
Field: ""
ID: 1,
Field: "",
}
}
if !foundN1 {
return nil, buf.MissingFieldError{
ID: 2
Field: ""
ID: 2,
Field: "",
}
}

Expand Down Expand Up @@ -241,14 +241,14 @@ func (v *Sample_Three[C, D]) Decode(r []byte) ([]byte, error) {

if !foundField1 {
return nil, buf.MissingFieldError{
ID: 1
Field: "field1"
ID: 1,
Field: "field1",
}
}
if !foundField2 {
return nil, buf.MissingFieldError{
ID: 2
Field: "field2"
ID: 2,
Field: "field2",
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/enum_many_ws.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type SampleVariant interface {
sealed()
}
Expand Down Expand Up @@ -130,14 +130,14 @@ func (v *Sample_Two) Decode(r []byte) ([]byte, error) {

if !foundN0 {
return nil, buf.MissingFieldError{
ID: 1
Field: ""
ID: 1,
Field: "",
}
}
if !foundN1 {
return nil, buf.MissingFieldError{
ID: 2
Field: ""
ID: 2,
Field: "",
}
}

Expand Down Expand Up @@ -225,14 +225,14 @@ func (v *Sample_Three) Decode(r []byte) ([]byte, error) {

if !foundField1 {
return nil, buf.MissingFieldError{
ID: 1
Field: "field1"
ID: 1,
Field: "field1",
}
}
if !foundField2 {
return nil, buf.MissingFieldError{
ID: 2
Field: "field2"
ID: 2,
Field: "field2",
}
}

Expand Down
32 changes: 16 additions & 16 deletions crates/mabo-go/tests/snapshots/render__render@enum_min_ws.mabo.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ input_file: crates/mabo-parser/tests/inputs/enum_min_ws.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample

type SampleVariant interface {
sealed()
}
Expand Down Expand Up @@ -148,20 +148,20 @@ func (v *Sample_Two[T]) Decode(r []byte) ([]byte, error) {

if !foundN0 {
return nil, buf.MissingFieldError{
ID: 1
Field: ""
ID: 1,
Field: "",
}
}
if !foundN1 {
return nil, buf.MissingFieldError{
ID: 2
Field: ""
ID: 2,
Field: "",
}
}
if !foundN2 {
return nil, buf.MissingFieldError{
ID: 3
Field: ""
ID: 3,
Field: "",
}
}

Expand Down Expand Up @@ -271,20 +271,20 @@ func (v *Sample_Three[T]) Decode(r []byte) ([]byte, error) {

if !foundField1 {
return nil, buf.MissingFieldError{
ID: 1
Field: "field1"
ID: 1,
Field: "field1",
}
}
if !foundField2 {
return nil, buf.MissingFieldError{
ID: 2
Field: "field2"
ID: 2,
Field: "field2",
}
}
if !foundField3 {
return nil, buf.MissingFieldError{
ID: 3
Field: "field3"
ID: 3,
Field: "field3",
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ input_file: crates/mabo-parser/tests/inputs/import_basic.mabo

// Code generated by mabo-go (v0.1.0). DO NOT EDIT.

package sample

import (
"github.com/dnaka91/mabo-go"
"github.com/dnaka91/mabo-go/buf"
mabo "github.com/dnaka91/mabo-go"
buf "github.com/dnaka91/mabo-go/buf"
)

package sample


Loading

0 comments on commit b38e1ca

Please sign in to comment.