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

explicit field order #70

Closed
sunfish-shogi opened this issue Nov 30, 2020 · 1 comment
Closed

explicit field order #70

sunfish-shogi opened this issue Nov 30, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sunfish-shogi
Copy link
Contributor

sunfish-shogi commented Nov 30, 2020

The filed order of struct is probably not guaranteed in future versions of Go compiler ???
https://stackoverflow.com/questions/32392311/reflect-type-field-order

If so, we should have order expressly.
For example:

type Emsg struct {
  FullBox               `mp4:"0,extend"`
  SchemeIdUri           string `mp4:"1,string"`
  Value                 string `mp4:"2,string"`
  Timescale             uint32 `mp4:"3,size=32"`
  PresentationTimeDelta uint32 `mp4:"4,size=32,ver=0"`
  PresentationTime      uint64 `mp4:"5,size=64,ver=1"`
  EventDuration         uint32 `mp4:"6,size=32"`
  Id                    uint32 `mp4:"7,size=32"`
  MessageData           []byte `mp4:"8,size=8,string"`
}
@sunfish-shogi sunfish-shogi added the bug Something isn't working label Nov 30, 2020
@sunfish-shogi sunfish-shogi self-assigned this Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant