File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -113,12 +113,14 @@ func (env Env) Inputs() []Input {
113
113
// curvesArray returns the Curve as an array.
114
114
func (env Env ) curvesArray () []interface {} {
115
115
switch val := env .Curve .(type ) {
116
- case string , float64 , Input :
116
+ case int , string , float64 , Input :
117
117
return arrayFromScalar (val , len (env .Times ))
118
- case []string :
119
- return stringsToEmpties (val )
118
+ case []int :
119
+ return intsToEmpties (val )
120
120
case []float64 :
121
121
return floatsToEmpties (val )
122
+ case []string :
123
+ return stringsToEmpties (val )
122
124
case []Input :
123
125
return inputsToEmpties (val )
124
126
case []interface {}:
@@ -128,6 +130,15 @@ func (env Env) curvesArray() []interface{} {
128
130
}
129
131
}
130
132
133
+ // intsToEmpties converts a int slice to a slice of the empty interface.
134
+ func intsToEmpties (arr []int ) []interface {} {
135
+ ret := make ([]interface {}, len (arr ))
136
+ for i , ii := range arr {
137
+ ret [i ] = ii
138
+ }
139
+ return ret
140
+ }
141
+
131
142
// floatsToEmpties converts a float slice to a slice of the empty interface.
132
143
func floatsToEmpties (arr []float64 ) []interface {} {
133
144
ret := make ([]interface {}, len (arr ))
You can’t perform that action at this time.
0 commit comments