Skip to content

Commit 6c8f684

Browse files
committed
Reorder imports. Fix some formatting.
1 parent 5e3163d commit 6c8f684

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

patchers/value/bench_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package value
22

33
import (
4+
"testing"
5+
6+
"github.com/stretchr/testify/require"
7+
48
"github.com/antonmedv/expr"
59
"github.com/antonmedv/expr/vm"
6-
"github.com/stretchr/testify/require"
7-
"testing"
810
)
911

1012
func Benchmark_valueAdd(b *testing.B) {

patchers/value/value.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ func (patcher) ApplyOptions(c *conf.Config) {
192192
}
193193

194194
func getExprValue(params ...any) (any, error) {
195-
196195
switch v := params[0].(type) {
197196
case ExprValuer:
198197
return v.ExprValue(), nil

patchers/value/value_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package value
22

33
import (
4+
"testing"
5+
6+
"github.com/stretchr/testify/require"
7+
48
"github.com/antonmedv/expr"
59
"github.com/antonmedv/expr/vm"
6-
"github.com/stretchr/testify/require"
7-
"testing"
810
)
911

1012
type customInt struct {
@@ -145,7 +147,7 @@ func Test_valueUntypedAddMismatch(t *testing.T) {
145147

146148
func Test_valueTypedArray(t *testing.T) {
147149
env := make(map[string]any)
148-
env["ValueOne"] = &customTypedArray{[]any{ 1, 2 }}
150+
env["ValueOne"] = &customTypedArray{[]any{1, 2}}
149151

150152
program, err := expr.Compile("ValueOne[0] + ValueOne[1]", expr.Env(env), Patcher)
151153
require.NoError(t, err)
@@ -158,7 +160,7 @@ func Test_valueTypedArray(t *testing.T) {
158160

159161
func Test_valueTypedMap(t *testing.T) {
160162
env := make(map[string]any)
161-
env["ValueOne"] = &customTypedMap{map[string]any{ "one": 1, "two": 2 } }
163+
env["ValueOne"] = &customTypedMap{map[string]any{"one": 1, "two": 2}}
162164

163165
program, err := expr.Compile("ValueOne.one + ValueOne.two", expr.Env(env), Patcher)
164166
require.NoError(t, err)

0 commit comments

Comments
 (0)