Skip to content

Commit

Permalink
(refactor): parser structs to embed Parser interface in v3 and v4 par…
Browse files Browse the repository at this point in the history
…sers
  • Loading branch information
zishang520 committed Sep 15, 2024
1 parent 44360b9 commit 0349bd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion parser/parser-v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import (
"github.com/zishang520/engine.io-go-parser/utils"
)

type parserv3 struct{}
type parserv3 struct {
Parser
}

var (
defaultParserv3 Parser = &parserv3{}
Expand Down
4 changes: 3 additions & 1 deletion parser/parser-v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import (
"github.com/zishang520/engine.io-go-parser/types"
)

type parserv4 struct{}
type parserv4 struct {
Parser
}

var (
defaultParserv4 Parser = &parserv4{}
Expand Down

0 comments on commit 0349bd2

Please sign in to comment.