Commit 2941c09
committed
fix: simplify parser API - remove NewParserFromFields
Corrections based on code review:
1. Removed NewParserFromFields helper - single NewParser(model) API only
2. Updated all tests to use actual struct models instead of field slices
3. Tests now demonstrate proper usage: NewParser(StructModel{})
4. Clean API: NewParser(model, config...) - no field slice constructors
All tests passing with simplified API.1 parent 3fd80cb commit 2941c09
2 files changed
Lines changed: 215 additions & 309 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 78 | + | |
90 | 79 | | |
91 | 80 | | |
92 | 81 | | |
| |||
97 | 86 | | |
98 | 87 | | |
99 | 88 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
103 | 93 | | |
104 | | - | |
105 | | - | |
| 94 | + | |
| 95 | + | |
106 | 96 | | |
107 | | - | |
108 | | - | |
| 97 | + | |
| 98 | + | |
109 | 99 | | |
110 | 100 | | |
111 | 101 | | |
| |||
115 | 105 | | |
116 | 106 | | |
117 | 107 | | |
118 | | - | |
| 108 | + | |
119 | 109 | | |
120 | 110 | | |
121 | 111 | | |
| |||
0 commit comments