mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 11:16:11 +01:00
code-search: make linters happy again
This commit is contained in:
parent
d2efdda911
commit
a98cf0e68e
|
@ -35,11 +35,9 @@ func Code(ctx *context.Context) {
|
|||
language := ctx.FormTrim("l")
|
||||
keyword := ctx.FormTrim("q")
|
||||
|
||||
isFuzzy := true
|
||||
isFuzzy := ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
|
||||
if mode := ctx.FormTrim("mode"); len(mode) > 0 {
|
||||
isFuzzy = mode == "fuzzy"
|
||||
} else {
|
||||
isFuzzy = ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
|
||||
}
|
||||
|
||||
ctx.Data["Keyword"] = keyword
|
||||
|
|
|
@ -40,11 +40,9 @@ func CodeSearch(ctx *context.Context) {
|
|||
language := ctx.FormTrim("l")
|
||||
keyword := ctx.FormTrim("q")
|
||||
|
||||
isFuzzy := true
|
||||
isFuzzy := ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
|
||||
if mode := ctx.FormTrim("mode"); len(mode) > 0 {
|
||||
isFuzzy = mode == "fuzzy"
|
||||
} else {
|
||||
isFuzzy = ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
|
||||
}
|
||||
|
||||
ctx.Data["Keyword"] = keyword
|
||||
|
|
Loading…
Reference in a new issue