WIP
This commit is contained in:
parent
1f467394b2
commit
e2d11e2cda
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user