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

hdf5/h5a: consider dropping the Datatype arg in Attribute.Read/Write #67

Open
sbinet opened this issue Nov 5, 2019 · 0 comments
Open

Comments

@sbinet
Copy link
Member

sbinet commented Nov 5, 2019

right now we have this API for Attribute:

type Attribute struct {
        Identifier
}

// Read reads raw data from a attribute into a buffer.
func (s *Attribute) Read(data interface{}, dtype *Datatype) error { ... }

// Write writes raw data from a buffer to an attribute.
func (s *Attribute) Write(data interface{}, dtype *Datatype) error { ... }

we already use reflect for the interface{} part (to discover its underlying type) so the *Datatype is not strictly needed in Go. (even in the not (yet?) handled case of conversions).

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

No branches or pull requests

1 participant