Commit 0c5f9f0
committed
Update counter example to match e2e test expectations
Changes:
- Restored Input element (required by e2e tests)
- Uses selector expression: e.Target.Value
- Uses method call: strconv.Atoi(value)
- Added import statement for strconv
- OnInput handler properly typed with Event parameter
This demonstrates all implemented features:
- Import statements pass through to generated code
- Selector expressions for field access (e.Target.Value)
- Package method calls (strconv.Atoi)
- Event handlers with correct signatures
Note: Multiple assignment (n, err := ...) doesn't work in function
literal bodies yet, so using single assignment for now.
E2E tests should now pass.1 parent 50f6556 commit 0c5f9f0
2 files changed
Lines changed: 18 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments