Skip to content

Commit

Permalink
Returning a parser with passed down opts
Browse files Browse the repository at this point in the history
  • Loading branch information
xBlaz3kx committed Dec 12, 2024
1 parent c5bc117 commit 68a41b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ func NewParser(opts ...Opt) *Parser {
func (p *Parser) ParseOcmfMessageFromString(data string) *Parser {
payloadSection, signature, err := parseOcmfMessageFromString(data)
if err != nil {
return &Parser{err: err}
return &Parser{err: err, withAutomaticValidation: p.withAutomaticValidation}
}

return &Parser{
payload: payloadSection,
signature: signature,
payload: payloadSection,
signature: signature,
withAutomaticValidation: p.withAutomaticValidation,
}
}

Expand Down

0 comments on commit 68a41b2

Please sign in to comment.