Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
修复 seach语句中的空格被吃掉
Browse files Browse the repository at this point in the history
  • Loading branch information
rootphantomer committed Oct 2, 2022
1 parent 5e5d449 commit 5591abb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ rust 项目代码 移步这里——<https://github.com/360quake/quake_rs/>

## 更新日志

- 2022-10-02 v2.0.2:

- 修复search空格被吃掉的问题
- 增加命令后颜色输出

- 2022-09-28 v2.0.1:

- 优化代码,更换即将弃用的函数
Expand Down
5 changes: 2 additions & 3 deletions utils/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"encoding/json"
"fmt"
"github.com/fatih/color"
"strings"
)

func FilterableServiceGET(token string) {
Expand Down Expand Up @@ -49,7 +48,7 @@ func SearchServicePost(reqjson Reqjson, token string) string {
// fmt.Println(tmp)
reqjson.Query = tmp
} else {
reqjson.Query = strings.ReplaceAll(reqjson.Query, " ", "")
//reqjson.Query = strings.ReplaceAll(reqjson.Query, " ", "")
if reqjson.Query == "" || reqjson.Query == "?" {
// fmt.Println("No query specified")
// return
Expand Down Expand Up @@ -138,7 +137,7 @@ func HostSearchPost(reqjson Reqjson, token string) string {
// fmt.Println(tmp)
reqjson.Query = tmp
} else {
reqjson.Query = strings.ReplaceAll(reqjson.Query, " ", "")
//reqjson.Query = strings.ReplaceAll(reqjson.Query, " ", "")
if reqjson.Query == "" || reqjson.Query == "?" {
// fmt.Println("No query specified")
panic("No query specified")
Expand Down

0 comments on commit 5591abb

Please sign in to comment.