-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
value_type.go
42 lines (37 loc) · 1.25 KB
/
value_type.go
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
42
// Copyright (c) 2017 Andrey Gayvoronsky <plandem@gmail.com>
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package rule
import (
"github.com/roboninc/xlsx/internal/ml/primitives"
)
// List of all possible values for ConditionValueType
const (
_ primitives.ConditionValueType = iota
//ValueTypeNumber type indicate that it's number
ValueTypeNumber
//ValueTypeNumber type indicate that it's percent
ValueTypePercent
//ValueTypeNumber type indicate that it's maximum
ValueTypeHighest
//ValueTypeNumber type indicate that it's minimum
ValueTypeLowest
//ValueTypeFormula type indicate that it's formula
ValueTypeFormula
//ValueTypePercentile type indicate that it's percentile
ValueTypePercentile
)
func init() {
primitives.FromConditionValueType = map[primitives.ConditionValueType]string{
ValueTypeNumber: "num",
ValueTypePercent: "percent",
ValueTypeHighest: "max",
ValueTypeLowest: "min",
ValueTypeFormula: "formula",
ValueTypePercentile: "percentile",
}
primitives.ToConditionValueType = make(map[string]primitives.ConditionValueType, len(primitives.FromConditionValueType))
for k, v := range primitives.FromConditionValueType {
primitives.ToConditionValueType[v] = k
}
}