This commit is contained in:
lordwelch 2017-11-06 22:14:09 -07:00
parent 2b15a961cd
commit 57b15ad53e

View File

@ -85,8 +85,6 @@ func main() {
ext string ext string
) )
fmt.Println(file.Name())
ext = path.Ext(file.Name()) ext = path.Ext(file.Name())
if strings.ToLower(ext) == "json" { if strings.ToLower(ext) == "json" {
var ( var (
@ -94,6 +92,7 @@ func main() {
T *os.File T *os.File
content []byte content []byte
) )
fmt.Println(file.Name())
T, err = os.Open(strings.TrimSuffix(file.Name(), ext)) T, err = os.Open(strings.TrimSuffix(file.Name(), ext))
if err != nil { if err != nil {
panic(err) panic(err)
@ -105,6 +104,7 @@ func main() {
} }
json.Unmarshal(content, tmp) json.Unmarshal(content, tmp)
fmt.Println(strings.TrimSuffix(file.Name(), ext))
keys[strings.TrimSuffix(file.Name(), ext)] = tmp keys[strings.TrimSuffix(file.Name(), ext)] = tmp
T.Close() T.Close()
} }