1
This commit is contained in:
Alex Yatskov 2016-08-02 20:57:47 -07:00
parent 1f467394b2
commit e2d11e2cda

View File

@ -24,8 +24,8 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt"
"io" "io"
"strconv"
"strings" "strings"
"github.com/FooSoft/jmdict" "github.com/FooSoft/jmdict"
@ -53,11 +53,10 @@ func (d *dictEntry) addTags(tags []string) {
func appendIndex(indices map[string]string, key string, value int) { func appendIndex(indices map[string]string, key string, value int) {
items, _ := indices[key] items, _ := indices[key]
if len(indices) == 0 { if len(indices) > 0 {
items = fmt.Sprintf(" %d", value) items = " "
} else {
items = string(value)
} }
items += strconv.Itoa(value)
indices[key] = items indices[key] = items
} }