@@ -31,7 +31,7 @@ type Node interface {
3131 // GetValue returns the node's value.
3232 GetValue () string
3333
34- // Equal returns true id this node is equal to the given node.
34+ // Equal returns true if this node is equal to the given node.
3535 Equal (n Node ) bool
3636}
3737
@@ -43,8 +43,8 @@ type Literal struct {
4343}
4444
4545// NewLiteral creates a new instance of Literal.
46- func NewLiteral (value string , datatype string , language string ) * Literal {
47- l := & Literal {
46+ func NewLiteral (value string , datatype string , language string ) Literal {
47+ l := Literal {
4848 Value : value ,
4949 Language : language ,
5050 }
@@ -59,12 +59,12 @@ func NewLiteral(value string, datatype string, language string) *Literal {
5959}
6060
6161// GetValue returns the node's value.
62- func (l * Literal ) GetValue () string {
62+ func (l Literal ) GetValue () string {
6363 return l .Value
6464}
6565
66- // Equal returns true id this node is equal to the given node.
67- func (l * Literal ) Equal (n Node ) bool {
66+ // Equal returns true if this node is equal to the given node.
67+ func (l Literal ) Equal (n Node ) bool {
6868 ol , ok := n .(* Literal )
6969 if ! ok {
7070 return false
@@ -91,21 +91,21 @@ type IRI struct {
9191}
9292
9393// NewIRI creates a new instance of IRI.
94- func NewIRI (iri string ) * IRI {
95- i := & IRI {
94+ func NewIRI (iri string ) IRI {
95+ i := IRI {
9696 Value : iri ,
9797 }
9898
9999 return i
100100}
101101
102102// GetValue returns the node's value.
103- func (iri * IRI ) GetValue () string {
103+ func (iri IRI ) GetValue () string {
104104 return iri .Value
105105}
106106
107- // Equal returns true id this node is equal to the given node.
108- func (iri * IRI ) Equal (n Node ) bool {
107+ // Equal returns true if this node is equal to the given node.
108+ func (iri IRI ) Equal (n Node ) bool {
109109 if oiri , ok := n .(* IRI ); ok {
110110 return iri .Value == oiri .Value
111111 }
@@ -119,21 +119,21 @@ type BlankNode struct {
119119}
120120
121121// NewBlankNode creates a new instance of BlankNode.
122- func NewBlankNode (attribute string ) * BlankNode {
123- bn := & BlankNode {
122+ func NewBlankNode (attribute string ) BlankNode {
123+ bn := BlankNode {
124124 Attribute : attribute ,
125125 }
126126
127127 return bn
128128}
129129
130130// GetValue returns the node's value.
131- func (bn * BlankNode ) GetValue () string {
131+ func (bn BlankNode ) GetValue () string {
132132 return bn .Attribute
133133}
134134
135- // Equal returns true id this node is equal to the given node.
136- func (bn * BlankNode ) Equal (n Node ) bool {
135+ // Equal returns true if this node is equal to the given node.
136+ func (bn BlankNode ) Equal (n Node ) bool {
137137 if obn , ok := n .(* BlankNode ); ok {
138138 return bn .Attribute == obn .Attribute
139139 }
@@ -143,19 +143,19 @@ func (bn *BlankNode) Equal(n Node) bool {
143143
144144// IsBlankNode returns true if the given node is a blank node
145145func IsBlankNode (node Node ) bool {
146- _ , isBlankNode := node .(* BlankNode )
146+ _ , isBlankNode := node .(BlankNode )
147147 return isBlankNode
148148}
149149
150150// IsIRI returns true if the given node is an IRI node
151151func IsIRI (node Node ) bool {
152- _ , isIRI := node .(* IRI )
152+ _ , isIRI := node .(IRI )
153153 return isIRI
154154}
155155
156156// IsLiteral returns true if the given node is a literal node
157157func IsLiteral (node Node ) bool {
158- _ , isLiteral := node .(* Literal )
158+ _ , isLiteral := node .(Literal )
159159 return isLiteral
160160}
161161
@@ -173,7 +173,7 @@ func RdfToObject(n Node, useNativeTypes bool) (map[string]interface{}, error) {
173173 }, nil
174174 }
175175
176- literal := n .(* Literal )
176+ literal := n .(Literal )
177177
178178 // convert literal object to JSON-LD
179179 rval := map [string ]interface {}{
0 commit comments