We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fe883e commit eabe91dCopy full SHA for eabe91d
h5i_identifier.go
@@ -11,6 +11,7 @@ package hdf5
11
import "C"
12
13
import (
14
+ "fmt"
15
"unsafe"
16
)
17
@@ -26,6 +27,27 @@ const (
26
27
BAD_ID IType = C.H5I_BADID
28
29
30
+func (typ IType) String() string {
31
+ switch typ {
32
+ case FILE:
33
+ return "file"
34
+ case GROUP:
35
+ return "group"
36
+ case DATATYPE:
37
+ return "datatype"
38
+ case DATASPACE:
39
+ return "dataspace"
40
+ case DATASET:
41
+ return "dataset"
42
+ case ATTRIBUTE:
43
+ return "attribute"
44
+ case BAD_ID:
45
+ return "bad_id"
46
+ default:
47
+ return fmt.Sprintf("IType=%d", int(typ))
48
+ }
49
+}
50
+
51
// Identifier is a simple wrapper around a C hid_t. It has basic methods
52
// which apply to every type in the go-hdf5 API.
53
type Identifier struct {
0 commit comments