File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -9,26 +9,26 @@ import (
9
9
)
10
10
11
11
12
- type curremtFn struct {
12
+ type currentFn struct {
13
13
}
14
14
15
15
func init () {
16
- function .Register (& curremtFn {})
16
+ function .Register (& currentFn {})
17
17
}
18
18
19
- func (s * curremtFn ) Name () string {
19
+ func (s * currentFn ) Name () string {
20
20
return "current"
21
21
}
22
22
23
- func (s * curremtFn ) GetCategory () string {
23
+ func (s * currentFn ) GetCategory () string {
24
24
return "datetime"
25
25
}
26
26
27
- func (s * curremtFn ) Sig () (paramTypes []data.Type , isVariadic bool ) {
27
+ func (s * currentFn ) Sig () (paramTypes []data.Type , isVariadic bool ) {
28
28
return []data.Type {}, false
29
29
}
30
30
31
- func (s * curremtFn ) Eval (d ... interface {}) (interface {}, error ) {
31
+ func (s * currentFn ) Eval (d ... interface {}) (interface {}, error ) {
32
32
log .RootLogger ().Debugf ("Returns the current datetime with UTC timezone" )
33
33
return time .Now ().UTC (), nil
34
34
}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ func init() {
13
13
}
14
14
15
15
func TestCurrentDate_Eval (t * testing.T ) {
16
- n := CurrentDatetime {}
16
+ n := currentFn {}
17
17
datetime , _ := n .Eval (nil )
18
18
fmt .Println (datetime )
19
19
assert .NotNil (t , datetime )
You can’t perform that action at this time.
0 commit comments