File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
19
19
- Changes the type of ` value ` in ` TypeFormField ` to ` interface{} ` instead of ` string ` to add support for any type of value in form fields.
20
20
21
+ ### Migration
22
+
23
+ #### Typecast value of form fields to expected type before using it
24
+
25
+ To read a value from formFields where id is ` name ` ,
26
+
27
+ Before:
28
+
29
+ ``` go
30
+ // formField should be of type []epmodels.TypeFormField
31
+ var name string
32
+ for id , value := range formFields {
33
+ if id == " name" {
34
+ name = value
35
+ }
36
+ }
37
+ ```
38
+
39
+ After:
40
+
41
+ ``` go
42
+ // formField should be of type []epmodels.TypeFormField
43
+ var name string
44
+ for id , value := ranger formFields {
45
+ if id == " name" {
46
+ nameAsStr , asStrOk := value.(string )
47
+ if !asStrOk {
48
+ // Handle the error accordingly
49
+ }
50
+ name = nameAsStr
51
+ }
52
+ }
53
+ ```
54
+
21
55
## [ 0.24.2] - 2024-09-03
22
56
23
57
- Fixes memory leak with the JWKS cache.
You can’t perform that action at this time.
0 commit comments