-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
enum_transform_no_match.yml
41 lines (34 loc) · 1.28 KB
/
enum_transform_no_match.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
39
40
41
input:
input.go: |
package example
import (
input "github.com/jmattheis/goverter/execution/input"
output "github.com/jmattheis/goverter/execution/output"
)
// goverter:converter
// goverter:enum:unknown @panic
type Converter interface {
// goverter:enum:transform regex Green Yellow
Convert(input.Color) output.Color
}
input/enum.go: |
package input
type Color int
const Green Color = iota
output/enum.go: |
package output
type Color string
const Blue Color = "blue"
error: |-
Error while creating converter method:
@workdir/input.go:12
func (github.com/jmattheis/goverter/execution.Converter).Convert(github.com/jmattheis/goverter/execution/input.Color) github.com/jmattheis/goverter/execution/output.Color
[source] github.com/jmattheis/goverter/execution/input.Color
[target] github.com/jmattheis/goverter/execution/output.Color
| github.com/jmattheis/goverter/execution/input.Color
|
source
target
|
| github.com/jmattheis/goverter/execution/output.Color
transformer "regex" with config "Green Yellow" did not return any mapped values. Is there an configuration error?