summaryrefslogtreecommitdiff
path: root/internal/mapr/fieldtypes.go
blob: a64efd1fdb558147e825c58f23102b131e84f165 (plain)
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
package mapr

import "fmt"

type fieldType int

// The possible field types.
const (
	UndefFieldType fieldType = iota
	Field          fieldType = iota
	String         fieldType = iota
	Float          fieldType = iota
	FunctionStack  fieldType = iota
)

func (w fieldType) String() string {
	switch w {
	case Field:
		return fmt.Sprintf("Field")
	case String:
		return fmt.Sprintf("String")
	case Float:
		return fmt.Sprintf("Float")
	case FunctionStack:
		return fmt.Sprintf("FunctionStack")
	default:
		return fmt.Sprintf("UndefFieldType")
	}
}