-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
default_with_error.yml
37 lines (31 loc) · 974 Bytes
/
default_with_error.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
input:
input.go: |
package execution
// goverter:converter
type Converter interface {
// goverter:default NewOutput
Convert(source Input) (Output, error)
}
type Input struct {
ID int
}
type Output struct {
ID int
}
func NewOutput() (Output, error) {
return Output{}, nil
}
success:
- generated/generated.go: |
// Code generated by github.com/jmattheis/goverter, DO NOT EDIT.
package generated
import execution "github.com/jmattheis/goverter/execution"
type ConverterImpl struct{}
func (c *ConverterImpl) Convert(source execution.Input) (execution.Output, error) {
executionOutput, err := execution.NewOutput()
if err != nil {
return executionOutput, err
}
executionOutput.ID = source.ID
return executionOutput, nil
}