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

chore: fix func name bugs

parent 351ddb59
...@@ -53,8 +53,8 @@ func newJSONStructParser() *jsonStructParser { ...@@ -53,8 +53,8 @@ func newJSONStructParser() *jsonStructParser {
} }
} }
// JSONFile2Interface parse json @filePath to interface // File2Interface parse json @filePath to interface
func JSONFile2Interface(filePath string) ([]HessianRegisterPair, interface{}, error) { func File2Interface(filePath string) ([]HessianRegisterPair, interface{}, error) {
defer func() { defer func() {
defaultJSONStructParser = newJSONStructParser() defaultJSONStructParser = newJSONStructParser()
}() }()
......
...@@ -27,8 +27,7 @@ import ( ...@@ -27,8 +27,7 @@ import (
func Test_newJsonStructParser(t *testing.T) { func Test_newJsonStructParser(t *testing.T) {
path := "./user.json" path := "./user.json"
jParser := newJSONStructParser() hessianPair, _, err := File2Interface(gitpath)
hessianPair, _, err := jParser.jsonFilePath2Struct(path)
assert.NotEmpty(t, hessianPair) assert.NotEmpty(t, hessianPair)
assert.Nil(t, err) 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