Skip to content

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

@sbinet

Description

@sbinet

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions