Skip to content

Commit 5404e3f

Browse files
authored
Create UPGRADE.md
1 parent f1ff6e1 commit 5404e3f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

UPGRADE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Upgrade
2+
3+
This file contains information on how to upgrade between major versions.
4+
5+
## 0.x → 1.x
6+
7+
### Deprecated `expr.Names` and `expr.Funcs`
8+
9+
Use `expr.Define` or `expr.With` instead of.
10+
11+
In new version you can specify types of variables, if you don't need type info use `interface{}`:
12+
13+
```go
14+
expr.Parse(code, expr.Names('Foo', 'Bar'))
15+
16+
// Change to
17+
18+
var foo, bar interface{}
19+
expr.Parse(code, expr.Define('Foo', foo), expr.Define('Bar', bar))
20+
21+
// Or
22+
23+
type params struct {
24+
Foo interface{}
25+
Bar interface{}
26+
}
27+
expr.Parse(code, expr.With(params{}))
28+
```
29+

0 commit comments

Comments
 (0)