Skip to content

Conversation

rubensayshi
Copy link
Contributor

@rubensayshi rubensayshi commented Feb 10, 2021

instead of having to provide a path it would be nice if we could provide the src ourselves, as this allows embedding the src into the binary, for example with go:embed added in go 1.16 :)

this seems to be the simplest way of making this possible without having to expose the builder and allows anyone to provide the source of the datadict in any way they like as a simple bytes.NewBuffer([]byte{}) or with anything else that provides a io.Reader!

if err := decoder.Decode(doc); err != nil {
return nil, err
}

b := new(builder)
var dict *DataDictionary
if dict, err = b.build(doc); err != nil {
dict, err := b.build(doc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this change, the declaration of dict above is no longer necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye, I thought it was there for stylistic reasons, fixing...

@ackleymi ackleymi merged commit 9cf5414 into quickfixgo:master Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants