File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func Code(ctx *context.Context) {
34
34
language := ctx .FormTrim ("l" )
35
35
keyword := ctx .FormTrim ("q" )
36
36
37
- isFuzzy := ctx .FormBool ("fuzzy" )
37
+ isFuzzy := ctx .FormOptionalBool ("fuzzy" ). ValueOrDefault ( true )
38
38
39
39
ctx .Data ["Keyword" ] = keyword
40
40
ctx .Data ["Language" ] = language
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ func Search(ctx *context.Context) {
24
24
language := ctx .FormTrim ("l" )
25
25
keyword := ctx .FormTrim ("q" )
26
26
27
- isFuzzy := ctx .FormBool ("fuzzy" )
27
+ isFuzzy := ctx .FormOptionalBool ("fuzzy" ). ValueOrDefault ( true )
28
28
29
29
ctx .Data ["Keyword" ] = keyword
30
30
ctx .Data ["Language" ] = language
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ func CodeSearch(ctx *context.Context) {
39
39
language := ctx .FormTrim ("l" )
40
40
keyword := ctx .FormTrim ("q" )
41
41
42
- isFuzzy := ctx .FormBool ("fuzzy" )
42
+ isFuzzy := ctx .FormOptionalBool ("fuzzy" ). ValueOrDefault ( true )
43
43
44
44
ctx .Data ["Keyword" ] = keyword
45
45
ctx .Data ["Language" ] = language
You can’t perform that action at this time.
0 commit comments