-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathextend_external_relative.yml
38 lines (32 loc) · 1.07 KB
/
extend_external_relative.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
38
input:
generated/convert.go: |
package generated
func IntToString(int) string {
return ""
}
input.go: |
package execution
// goverter:converter
// the next line enables string converters from local package
// goverter:output:package github.com/jmattheis/goverter/execution/generated
// goverter:extend ./generated:IntToString
type Converter interface {
Convert(source Input) Output
}
type Input struct {
Age int
}
type Output struct {
Age string
}
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 {
var executionOutput execution.Output
executionOutput.Age = IntToString(source.Age)
return executionOutput
}