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{
8282 " bar.Value in ['a', 'b', 'c']" ,
8383 " name matches '^hello.+$'" ,
8484 " now().Sub(startedAt).String()" ,
85- " all(tweets, {.Size <= 280}) ? '👍' : '👎'" ,
85+ " all(tweets, {len(.Message) <= 280}) ? '👍' : '👎'" ,
8686}
8787
8888var environment = map [string ]interface {}{
@@ -91,12 +91,11 @@ var environment = map[string]interface{}{
9191 " name" : " hello world" ,
9292 " startedAt" : time.Now (),
9393 " now" : func () time.Time { return time.Now () },
94- " tweets" : []tweet{},
94+ " tweets" : []tweet{{ " first tweet " } },
9595}
9696
9797type tweet struct {
9898 Message string
99- Size int
10099}
101100
102101func main () {
@@ -114,7 +113,6 @@ func main() {
114113 fmt.Println (output)
115114 }
116115}
117-
118116```
119117
120118## Contributing
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ var expressions = []string{
1212 "bar.Value in ['a', 'b', 'c']" ,
1313 "name matches '^hello.+$'" ,
1414 "now().Sub(startedAt).String()" ,
15- "all(tweets, {.Size <= 280}) ? '👍' : '👎'" ,
15+ "all(tweets, {len(.Message) <= 280}) ? '👍' : '👎'" ,
1616}
1717
1818var environment = map [string ]interface {}{
@@ -21,12 +21,11 @@ var environment = map[string]interface{}{
2121 "name" : "hello world" ,
2222 "startedAt" : time .Now (),
2323 "now" : func () time.Time { return time .Now () },
24- "tweets" : []tweet {},
24+ "tweets" : []tweet {{ "first tweet" } },
2525}
2626
2727type tweet struct {
2828 Message string
29- Size int
3029}
3130
3231func main () {
You can’t perform that action at this time.
0 commit comments