mirror of
https://github.com/miguelmota/cointop
synced 2024-11-05 00:00:14 +00:00
Remove junk \0 from the end of search-string
This commit is contained in:
parent
f7d997683f
commit
04ee0eb5f7
@ -66,7 +66,7 @@ func (ct *Cointop) DoSearch() error {
|
||||
if n == 0 {
|
||||
return nil
|
||||
}
|
||||
q := string(b)
|
||||
q := strings.TrimSpace(string(b[:n]))
|
||||
// remove slash
|
||||
regex := regexp.MustCompile(`/(.*)`)
|
||||
matches := regex.FindStringSubmatch(q)
|
||||
|
Loading…
Reference in New Issue
Block a user