-
Notifications
You must be signed in to change notification settings - Fork 21
/
null.go
50 lines (32 loc) · 934 Bytes
/
null.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package cwl
//"fmt"
//"strconv"
// YAML: null | Null | NULL | ~
type Null string
func (i *Null) Is_CWL_object() {}
func (i *Null) GetClass() string { return string(CWL_null) } // for CWL_object
func (i *Null) GetType() CWLType_Type { return CWL_null }
func (i *Null) String() string { return "Null" }
func (i *Null) GetId() string { return "" } // TODO deprecated functions
func (i *Null) SetId(x string) {}
func (i *Null) Is_CWL_minimal() {}
func NewNull() (n *Null) {
var null_nptr Null
null_nptr = Null("Null")
n = &null_nptr
return
}
// https://mlafeldt.github.io/blog/decoding-yaml-in-go/
// No, use this: https://godoc.org/gopkg.in/yaml.v2#Marshaler
func (n *Null) MarshalYAML() (i interface{}, err error) {
i = nil
return
}
func (n *Null) MarshalJSON() (b []byte, err error) {
b = []byte("null")
return
}
func (n *Null) GetBSON() (result interface{}, err error) {
result = nil
return
}