1
0
Fork 0

Better parsing of #kyotocabinet status

This commit is contained in:
Gregory Eremin 2014-07-29 13:59:37 +07:00
parent 90d48a823b
commit f11781b61b
1 changed files with 2 additions and 2 deletions

View File

@ -53,10 +53,10 @@ func DebugHandler(w http.ResponseWriter, r *http.Request) {
tokens := strings.Split(s, "\n") tokens := strings.Split(s, "\n")
for _, t := range tokens { for _, t := range tokens {
tt := strings.Split(t, "\t") tt := strings.Split(t, "\t")
if tt[0] == "path" { num, err := strconv.Atoi(tt[1])
if err != nil {
ks[tt[0]] = tt[1] ks[tt[0]] = tt[1]
} else { } else {
num, _ := strconv.Atoi(tt[1])
ks[tt[0]] = num ks[tt[0]] = num
} }
} }