Skip to content

Commit

Permalink
fix: Trim result
Browse files Browse the repository at this point in the history
  • Loading branch information
zu1k committed Oct 26, 2021
1 parent 17b9c8d commit 9af0000
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package db
import (
"os"
"path/filepath"
"strings"

"github.com/zu1k/nali/internal/constant"
"github.com/zu1k/nali/pkg/cdn"
Expand Down Expand Up @@ -105,5 +106,7 @@ func Find(typ dbif.QueryType, query string) string {
if err != nil {
return ""
}
return result.String()
r := strings.Trim(result.String(), " ")
queryCache[query] = r
return r
}

0 comments on commit 9af0000

Please sign in to comment.