hdf5/h5a: consider dropping the Datatype arg in Attribute.Read/Write
sbinet opened this issue · 0 comments
sbinet commented
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).