Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gostnops
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
gostnops
Commits
727c4c7f
Commit
727c4c7f
authored
Dec 01, 2020
by
李志信
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix func name bugs
parent
351ddb59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
parser.go
encoding/json/parser.go
+2
-2
parser_test.go
encoding/json/parser_test.go
+1
-2
No files found.
encoding/json/parser.go
View file @
727c4c7f
...
...
@@ -53,8 +53,8 @@ func newJSONStructParser() *jsonStructParser {
}
}
//
JSON
File2Interface parse json @filePath to interface
func
JSON
File2Interface
(
filePath
string
)
([]
HessianRegisterPair
,
interface
{},
error
)
{
// File2Interface parse json @filePath to interface
func
File2Interface
(
filePath
string
)
([]
HessianRegisterPair
,
interface
{},
error
)
{
defer
func
()
{
defaultJSONStructParser
=
newJSONStructParser
()
}()
...
...
encoding/json/parser_test.go
View file @
727c4c7f
...
...
@@ -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
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment