@@ -62,52 +62,34 @@ func (o *optionsStruct) Unmarshal(options map[string]interface{}) {
62
62
}
63
63
}
64
64
65
- connectInterface , ok : = options ["connect" ]
65
+ _ , ok = options ["connect" ]
66
66
if ok {
67
- connect , ok := connectInterface .(bool )
68
- if ok {
69
- o .Connect = connect
70
- }
67
+ o .Connect = true
71
68
}
72
69
73
- tableExistsInterface , ok : = options ["table_exists" ]
70
+ _ , ok = options ["table_exists" ]
74
71
if ok {
75
- tableExists , ok := tableExistsInterface .(bool )
76
- if ok {
77
- o .TableExists = tableExists
78
- }
72
+ o .TableExists = true
79
73
}
80
74
81
- rowExistsInterface , ok : = options ["row_exists" ]
75
+ _ , ok = options ["row_exists" ]
82
76
if ok {
83
- rowExists , ok := rowExistsInterface .(bool )
84
- if ok {
85
- o .RowExists = rowExists
86
- }
77
+ o .RowExists = true
87
78
}
88
79
89
- regexMatchInterface , ok : = options ["regex_match" ]
80
+ _ , ok = options ["regex_match" ]
90
81
if ok {
91
- regexMatch , ok := regexMatchInterface .(bool )
92
- if ok {
93
- o .RegexMatch = regexMatch
94
- }
82
+ o .RegexMatch = true
95
83
}
96
84
97
- substringMatchInterface , ok : = options ["substring_match" ]
85
+ _ , ok = options ["substring_match" ]
98
86
if ok {
99
- substringMatch , ok := substringMatchInterface .(bool )
100
- if ok {
101
- o .SubstringMatch = substringMatch
102
- }
87
+ o .SubstringMatch = true
103
88
}
104
89
105
- matchInterface , ok : = options ["match" ]
90
+ _ , ok = options ["match" ]
106
91
if ok {
107
- match , ok := matchInterface .(bool )
108
- if ok {
109
- o .Match = match
110
- }
92
+ o .Match = true
111
93
}
112
94
}
113
95
0 commit comments