-
-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathenum_from_primitive.yml
More file actions
34 lines (27 loc) · 834 Bytes
/
Copy pathenum_from_primitive.yml
File metadata and controls
34 lines (27 loc) · 834 Bytes
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
input:
input.go: |
package example
import (
output "github.com/jmattheis/goverter/execution/output"
)
// goverter:converter
type Converter interface {
Convert(string) output.Color
}
output/enum.go: |
package output
type Color string
const (
Default Color = "default"
Green Color = "green"
Red Color = "red"
)
success:
- generated/generated.go: |
// Code generated by github.com/jmattheis/goverter, DO NOT EDIT.
package generated
import output "github.com/jmattheis/goverter/execution/output"
type ConverterImpl struct{}
func (c *ConverterImpl) Convert(source string) output.Color {
return output.Color(source)
}