Commit 727c4c7f authored by 李志信's avatar 李志信

chore: fix func name bugs

parent 351ddb59
......@@ -53,8 +53,8 @@ func newJSONStructParser() *jsonStructParser {
}
}
// JSONFile2Interface parse json @filePath to interface
func JSONFile2Interface(filePath string) ([]HessianRegisterPair, interface{}, error) {
// File2Interface parse json @filePath to interface
func File2Interface(filePath string) ([]HessianRegisterPair, interface{}, error) {
defer func() {
defaultJSONStructParser = newJSONStructParser()
}()
......
......@@ -27,8 +27,7 @@ import (
func Test_newJsonStructParser(t *testing.T) {
path := "./user.json"
jParser := newJSONStructParser()
hessianPair, _, err := jParser.jsonFilePath2Struct(path)
hessianPair, _, err := File2Interface(gitpath)
assert.NotEmpty(t, hessianPair)
assert.Nil(t, err)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment