Better parsing of #kyotocabinet status
This commit is contained in:
parent
90d48a823b
commit
f11781b61b
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue