File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ var expressions = []string{
82
82
" bar.Value in ['a', 'b', 'c']" ,
83
83
" name matches '^hello.+$'" ,
84
84
" now().Sub(startedAt).String()" ,
85
- " all(tweets, {.Size <= 280}) ? '👍' : '👎'" ,
85
+ " all(tweets, {len(.Message) <= 280}) ? '👍' : '👎'" ,
86
86
}
87
87
88
88
var environment = map [string ]interface {}{
@@ -91,12 +91,11 @@ var environment = map[string]interface{}{
91
91
" name" : " hello world" ,
92
92
" startedAt" : time.Now (),
93
93
" now" : func () time.Time { return time.Now () },
94
- " tweets" : []tweet{},
94
+ " tweets" : []tweet{{ " first tweet " } },
95
95
}
96
96
97
97
type tweet struct {
98
98
Message string
99
- Size int
100
99
}
101
100
102
101
func main () {
@@ -114,7 +113,6 @@ func main() {
114
113
fmt.Println (output)
115
114
}
116
115
}
117
-
118
116
```
119
117
120
118
## Contributing
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ var expressions = []string{
12
12
"bar.Value in ['a', 'b', 'c']" ,
13
13
"name matches '^hello.+$'" ,
14
14
"now().Sub(startedAt).String()" ,
15
- "all(tweets, {.Size <= 280}) ? '👍' : '👎'" ,
15
+ "all(tweets, {len(.Message) <= 280}) ? '👍' : '👎'" ,
16
16
}
17
17
18
18
var environment = map [string ]interface {}{
@@ -21,12 +21,11 @@ var environment = map[string]interface{}{
21
21
"name" : "hello world" ,
22
22
"startedAt" : time .Now (),
23
23
"now" : func () time.Time { return time .Now () },
24
- "tweets" : []tweet {},
24
+ "tweets" : []tweet {{ "first tweet" } },
25
25
}
26
26
27
27
type tweet struct {
28
28
Message string
29
- Size int
30
29
}
31
30
32
31
func main () {
You can’t perform that action at this time.
0 commit comments