Skip to content

Commit 8c64ee5

Browse files
committed
Update jsongo dep
Change-Id: I10dfbaa38de67835a84f5112d6b16bbe466c3bfe Signed-off-by: Ondrej Fabry <[email protected]>
1 parent e095944 commit 8c64ee5

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

cmd/binapi-generator/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ func getInputFiles(inputDir string, deep int) (files []string, err error) {
142142
return files, nil
143143
}
144144

145-
func parseInputJSON(inputData []byte) (*jsongo.JSONNode, error) {
146-
jsonRoot := new(jsongo.JSONNode)
145+
func parseInputJSON(inputData []byte) (*jsongo.Node, error) {
146+
jsonRoot := new(jsongo.Node)
147147
if err := json.Unmarshal(inputData, jsonRoot); err != nil {
148148
return nil, fmt.Errorf("unmarshalling JSON failed: %v", err)
149149
}

cmd/binapi-generator/parse.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const (
7373
)
7474

7575
// parsePackage parses provided JSON data into objects prepared for code generation
76-
func parsePackage(ctx *context, jsonRoot *jsongo.JSONNode) (*Package, error) {
76+
func parsePackage(ctx *context, jsonRoot *jsongo.Node) (*Package, error) {
7777
pkg := Package{
7878
Name: ctx.packageName,
7979
RefMap: make(map[string]string),
@@ -241,7 +241,7 @@ func parsePackage(ctx *context, jsonRoot *jsongo.JSONNode) (*Package, error) {
241241
}
242242

243243
// parseEnum parses VPP binary API enum object from JSON node
244-
func parseEnum(ctx *context, enumNode *jsongo.JSONNode) (*Enum, error) {
244+
func parseEnum(ctx *context, enumNode *jsongo.Node) (*Enum, error) {
245245
if enumNode.Len() == 0 || enumNode.At(0).GetType() != jsongo.TypeValue {
246246
return nil, errors.New("invalid JSON for enum specified")
247247
}
@@ -286,7 +286,7 @@ func parseEnum(ctx *context, enumNode *jsongo.JSONNode) (*Enum, error) {
286286
}
287287

288288
// parseUnion parses VPP binary API union object from JSON node
289-
func parseUnion(ctx *context, unionNode *jsongo.JSONNode) (*Union, error) {
289+
func parseUnion(ctx *context, unionNode *jsongo.Node) (*Union, error) {
290290
if unionNode.Len() == 0 || unionNode.At(0).GetType() != jsongo.TypeValue {
291291
return nil, errors.New("invalid JSON for union specified")
292292
}
@@ -323,7 +323,7 @@ func parseUnion(ctx *context, unionNode *jsongo.JSONNode) (*Union, error) {
323323
}
324324

325325
// parseType parses VPP binary API type object from JSON node
326-
func parseType(ctx *context, typeNode *jsongo.JSONNode) (*Type, error) {
326+
func parseType(ctx *context, typeNode *jsongo.Node) (*Type, error) {
327327
if typeNode.Len() == 0 || typeNode.At(0).GetType() != jsongo.TypeValue {
328328
return nil, errors.New("invalid JSON for type specified")
329329
}
@@ -360,7 +360,7 @@ func parseType(ctx *context, typeNode *jsongo.JSONNode) (*Type, error) {
360360
}
361361

362362
// parseAlias parses VPP binary API alias object from JSON node
363-
func parseAlias(ctx *context, aliasName string, aliasNode *jsongo.JSONNode) (*Alias, error) {
363+
func parseAlias(ctx *context, aliasName string, aliasNode *jsongo.Node) (*Alias, error) {
364364
if aliasNode.Len() == 0 || aliasNode.At(aliasTypeField).GetType() != jsongo.TypeValue {
365365
return nil, errors.New("invalid JSON for alias specified")
366366
}
@@ -391,7 +391,7 @@ func parseAlias(ctx *context, aliasName string, aliasNode *jsongo.JSONNode) (*Al
391391
}
392392

393393
// parseMessage parses VPP binary API message object from JSON node
394-
func parseMessage(ctx *context, msgNode *jsongo.JSONNode) (*Message, error) {
394+
func parseMessage(ctx *context, msgNode *jsongo.Node) (*Message, error) {
395395
if msgNode.Len() == 0 || msgNode.At(0).GetType() != jsongo.TypeValue {
396396
return nil, errors.New("invalid JSON for message specified")
397397
}
@@ -429,7 +429,7 @@ func parseMessage(ctx *context, msgNode *jsongo.JSONNode) (*Message, error) {
429429
}
430430

431431
// parseField parses VPP binary API object field from JSON node
432-
func parseField(ctx *context, field *jsongo.JSONNode) (*Field, error) {
432+
func parseField(ctx *context, field *jsongo.Node) (*Field, error) {
433433
if field.Len() < 2 || field.At(0).GetType() != jsongo.TypeValue || field.At(1).GetType() != jsongo.TypeValue {
434434
return nil, errors.New("invalid JSON for field specified")
435435
}
@@ -489,7 +489,7 @@ func parseField(ctx *context, field *jsongo.JSONNode) (*Field, error) {
489489
}
490490

491491
// parseService parses VPP binary API service object from JSON node
492-
func parseService(ctx *context, svcName string, svcNode *jsongo.JSONNode) (*Service, error) {
492+
func parseService(ctx *context, svcName string, svcNode *jsongo.Node) (*Service, error) {
493493
if svcNode.Len() == 0 || svcNode.At(replyField).GetType() != jsongo.TypeValue {
494494
return nil, errors.New("invalid JSON for service specified")
495495
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module git.fd.io/govpp.git
33
go 1.12
44

55
require (
6-
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66
6+
github.com/bennyscetbun/jsongo v1.1.0
77
github.com/fsnotify/fsnotify v0.0.0-20170329110642-4da3e2cfbabc
88
github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff
99
github.com/golang/protobuf v1.3.2 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66 h1:isQTypXGM6KLr0gdEDjhJ9Z5F0gefMdgDI42LrS5/LQ=
2-
github.com/bennyscetbun/jsongo v0.0.0-20160422144625-5240b3f82c66/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U=
1+
github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM=
2+
github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U=
33
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
44
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
55
github.com/fsnotify/fsnotify v0.0.0-20170329110642-4da3e2cfbabc h1:fqUzyjP8DApxXq0dOZJE/NvqQkyjxiTy9ARNyRwBPEw=

0 commit comments

Comments
 (0)