Skip to content

Commit

Permalink
remove parser in favour of using dependencies
Browse files Browse the repository at this point in the history
Add the following dependencies:

```
github.com/katydid/parser-go v0.6.0
github.com/katydid/parser-go-json v0.1.0
github.com/katydid/parser-go-reflect v0.1.0
github.com/katydid/parser-go-xml v0.1.0
```

This way we can remove the parser code from the validator
  • Loading branch information
awalterschulze committed Jan 13, 2025
1 parent 0aae629 commit 9cb3e59
Show file tree
Hide file tree
Showing 60 changed files with 51 additions and 7,725 deletions.
29 changes: 0 additions & 29 deletions COPIED_FROM_GO

This file was deleted.

4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ checklicense:
doc.go \
tools/tools.go \
.svg \
.txt \
COPIED_FROM_GO \
parser/yaml/issues.md
.txt

test:
go test ./...
Expand Down
2 changes: 1 addition & 1 deletion encode/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"encoding/json"
"io"

"github.com/katydid/validator-go/parser"
"github.com/katydid/parser-go/parser"
)

// Encode encodes a parser.Interface into a byte slice containing valid json.
Expand Down
4 changes: 2 additions & 2 deletions encode/json/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"reflect"
"testing"

jsonparser "github.com/katydid/validator-go/parser/json"
reflectparser "github.com/katydid/validator-go/parser/reflect"
jsonparser "github.com/katydid/parser-go-json/json"
reflectparser "github.com/katydid/parser-go-reflect/reflect"
)

func testTranscode(t *testing.T, input interface{}) {
Expand Down
2 changes: 1 addition & 1 deletion encode/reflect/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"io"
"reflect"

"github.com/katydid/validator-go/parser"
"github.com/katydid/parser-go/parser"
)

// Encode encodes a parser.Interface into a go structure value.
Expand Down
2 changes: 1 addition & 1 deletion encode/reflect/reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

reflectparser "github.com/katydid/validator-go/parser/reflect"
reflectparser "github.com/katydid/parser-go-reflect/reflect"
)

func testCopy(t *testing.T, input interface{}) {
Expand Down
2 changes: 1 addition & 1 deletion encode/xml/xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"io"
"strconv"

"github.com/katydid/validator-go/parser"
"github.com/katydid/parser-go/parser"
)

// Encode encodes a parser.Interface into a byte slice containing valid xml.
Expand Down
2 changes: 1 addition & 1 deletion encode/xml/xml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"reflect"
"testing"

xmlparser "github.com/katydid/validator-go/parser/xml"
xmlparser "github.com/katydid/parser-go-xml/xml"
)

func testTranscode(t *testing.T, input interface{}) {
Expand Down
7 changes: 7 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ module github.com/katydid/validator-go

go 1.23

require (
github.com/katydid/parser-go v0.6.0
github.com/katydid/parser-go-json v0.1.0
github.com/katydid/parser-go-reflect v0.1.0
github.com/katydid/parser-go-xml v0.1.0
)

require (
github.com/awalterschulze/checklicense v1.0.0
github.com/awalterschulze/goderive v0.5.0
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ github.com/awalterschulze/goderive v0.5.0 h1:fzWIV1WVS20EQT3YMXJhjiPZIZom1dlgiab
github.com/awalterschulze/goderive v0.5.0/go.mod h1:rXccmDQDJN/4aGqWxWhq+UmBJeQEkFV/2/rkluP+ipA=
github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198 h1:FSii2UQeSLngl3jFoR4tUKZLprO7qUlh/TKKticc0BM=
github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198/go.mod h1:DTh/Y2+NbnOVVoypCCQrovMPDKUGp4yZpSbWg5D0XIM=
github.com/katydid/parser-go v0.6.0 h1:8VFYXEp9pZsq4CCxYLDavPPqOSX+JXsmhjfU4XMB8iw=
github.com/katydid/parser-go v0.6.0/go.mod h1:1BwRfDlyRgDlAaURZ4FXi7IzHqWKTsrCdsstLsFeQho=
github.com/katydid/parser-go-json v0.1.0 h1:r3+YkDtf9A4JYO+MrdQsN2azxITrgO+2Sc5SSNhp+YI=
github.com/katydid/parser-go-json v0.1.0/go.mod h1:iLjxtkGLdPROUPBHZAhOTIdQerUPl/FEplS10rlq9Nc=
github.com/katydid/parser-go-reflect v0.1.0 h1:GsmmOjPC9eLVVHx/Q8nzOPAiOhSan6UP8z9oDOEbYiY=
github.com/katydid/parser-go-reflect v0.1.0/go.mod h1:v+FO4WoxNNIhpjzF7nam4YuUzWCe8LFclO4B0f3OaPI=
github.com/katydid/parser-go-xml v0.1.0 h1:8AL0X9hQbNLbQeqRbOdKBOwx4WTSWjy7kxEMmWqHMXc=
github.com/katydid/parser-go-xml v0.1.0/go.mod h1:7rEHS3YuEv/8/ep+uQnLgcvT1znZs8JEc3ZaBbpygjA=
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
Expand Down
2 changes: 0 additions & 2 deletions parser/debug/doc.go

This file was deleted.

70 changes: 0 additions & 70 deletions parser/debug/example.go

This file was deleted.

154 changes: 0 additions & 154 deletions parser/debug/log.go

This file was deleted.

36 changes: 0 additions & 36 deletions parser/debug/node.go

This file was deleted.

Loading

0 comments on commit 9cb3e59

Please sign in to comment.