Skip to content

Commit 100ef04

Browse files
delaneyjkortschak
authored andcommitted
hdf5: add attribute access to Group
1 parent 8320788 commit 100ef04

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

h5d_dataset.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ func (s *Dataset) CreateAttributeWith(name string, dtype *Datatype, dspace *Data
167167
}
168168

169169
// Opens an existing attribute. The returned attribute must be closed
170-
// by the user when it is no longer needed. The returned attribute
171-
// must be closed by the user when it is no longer needed.
170+
// by the user when it is no longer needed.
172171
func (s *Dataset) OpenAttribute(name string) (*Attribute, error) {
173172
return openAttribute(s.id, name)
174173
}

h5g_group.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ func (g *Group) CreateAttributeWith(name string, dtype *Datatype, dspace *Datasp
6666
return createAttribute(g.id, name, dtype, dspace, acpl)
6767
}
6868

69+
// Opens an existing attribute. The returned attribute must be closed
70+
// by the user when it is no longer needed.
71+
func (g *Group) OpenAttribute(name string) (*Attribute, error) {
72+
return openAttribute(g.id, name)
73+
}
74+
6975
// Close closes the Group.
7076
func (g *Group) Close() error {
7177
return g.closeWith(h5gclose)

0 commit comments

Comments
 (0)