Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): refactor Go SDK to be more intuitive #604

Closed
wants to merge 1 commit into from

Conversation

Nickersoft
Copy link
Member

This PR introduces a major change to the Go SDK to make building dictionaries declaratively more intuitive. A number of renames have taken place, notably:

  • Representable types are now just the default types. So DictionaryRepresentable is now just Dictionary.
  • To distinguish from the Go structs, all FlatBuffer objects now have a Buffer prefix. So the old Dictionary type, which used to be a FlatBuffer, is now called DictionaryBuffer.
  • Renamed AsRepresentable() to Struct()
  • Renamed AsBuffer to Buffer() and updated it to return an actual FlatBuffer
  • Added Table() method that returns what the old AsBuffer() method used to – a FlatBuffers table offset
  • Added Bytes() method that returns a byte array
  • Changed the names of all of the Compile and Write methods. Any Compile method will accept a path/XML/dictionary/etc and give you a fully qualified ODict byte buffer back, whereas Write does the same thing, except it writes the buffer to the specified output path and gives you the bytes written

The docs site will need to be updated.

@Nickersoft
Copy link
Member Author

Closing in favor of #639

@Nickersoft Nickersoft closed this Mar 24, 2024
@Nickersoft Nickersoft deleted the nickersoft/refactor branch March 24, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant