mirror of
https://github.com/quitesimpleorg/hs9001.git
synced 2024-11-22 09:47:51 +01:00
search: concat multiple arguments. Don't just use the first
This is more natural
This commit is contained in:
parent
31973bd5dd
commit
eb0612864d
3
main.go
3
main.go
@ -9,6 +9,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
|
||||||
_ "modernc.org/sqlite"
|
_ "modernc.org/sqlite"
|
||||||
)
|
)
|
||||||
@ -152,7 +153,7 @@ func main() {
|
|||||||
if argslen < 2 {
|
if argslen < 2 {
|
||||||
fmt.Fprint(os.Stderr, "Please provide the search query\n")
|
fmt.Fprint(os.Stderr, "Please provide the search query\n")
|
||||||
}
|
}
|
||||||
q := args[1]
|
q := strings.Join(args[1:], " ")
|
||||||
search(conn, q)
|
search(conn, q)
|
||||||
os.Exit(23)
|
os.Exit(23)
|
||||||
} else if cmd == "init" {
|
} else if cmd == "init" {
|
||||||
|
Loading…
Reference in New Issue
Block a user