Skip to content

Commit 499ecc6

Browse files
author
New year
committed
crud: refactor optional types to use go-option
- Remove: OptUint, OptInt, OptFloat64, OptString, OptBool, OptTuple. - Remove: MakeOptUint, MakeOptInt, MakeOptFloat64, MakeOptString, MakeOptBool, MakeOptTuple. - Update: All option structs to use option.* types. - Add type Any from go-option. - Fix: Test type inconsistencies. Changed #492
1 parent bbc6d96 commit 499ecc6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crud/compile_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ func TestSomeAny(t *testing.T) {
6767

6868
for _, tc := range testCases {
6969
t.Run(tc.name, func(t *testing.T) {
70-
opt := option.SomeAny(tc.value)
70+
var opt option.Any
71+
72+
if tc.value != nil {
73+
opt = option.SomeAny(tc.value)
74+
} else {
75+
opt = option.NoneAny()
76+
}
7177
val, exists := opt.Get()
7278

7379
if tc.value == nil {

0 commit comments

Comments
 (0)