Skip to content

Commit 56b43ab

Browse files
committed
comments
1 parent 934d4a1 commit 56b43ab

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

edge.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Edge struct {
1717
graph *Graph
1818
}
1919

20-
// Create a new Edge
20+
// EdgeNew create a new Edge
2121
func EdgeNew(relation string, srcNode *Node, destNode *Node, properties map[string]interface{}) *Edge {
2222
p := properties
2323
if p == nil {
@@ -33,18 +33,18 @@ func EdgeNew(relation string, srcNode *Node, destNode *Node, properties map[stri
3333
}
3434
}
3535

36-
// Assign a new property to edge
36+
// SetProperty assign a new property to edge
3737
func (e *Edge) SetProperty(key string, value interface{}) {
3838
e.Properties[key] = value
3939
}
4040

41-
// Retrieves property from edge
41+
// GetProperty retrieves property from edge
4242
func (e *Edge) GetProperty(key string) interface{} {
4343
v, _ := e.Properties[key]
4444
return v
4545
}
4646

47-
// Returns edge source node ID
47+
// SourceNodeID returns edge source node ID
4848
func (e Edge) SourceNodeID() uint64 {
4949
if e.Source != nil {
5050
return e.Source.ID
@@ -53,7 +53,7 @@ func (e Edge) SourceNodeID() uint64 {
5353
}
5454
}
5555

56-
// Returns edge destination node ID
56+
// DestNodeID returns edge destination node ID
5757
func (e Edge) DestNodeID() uint64 {
5858
if e.Source != nil {
5959
return e.Destination.ID
@@ -77,7 +77,7 @@ func (e Edge) String() string {
7777
return s
7878
}
7979

80-
// String makes Edge satisfy the Stringer interface
80+
// Encode makes Edge satisfy the Stringer interface
8181
func (e Edge) Encode() string {
8282
s := []string{"(", e.Source.Alias, ")"}
8383

node.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Node struct {
1414
graph *Graph
1515
}
1616

17-
// Create a new Node
17+
// NodeNew create a new Node
1818
func NodeNew(labels []string, alias string, properties map[string]interface{}) *Node {
1919

2020
p := properties
@@ -30,12 +30,12 @@ func NodeNew(labels []string, alias string, properties map[string]interface{}) *
3030
}
3131
}
3232

33-
// Asssign a new property to node
33+
// SetProperty asssign a new property to node
3434
func (n *Node) SetProperty(key string, value interface{}) {
3535
n.Properties[key] = value
3636
}
3737

38-
// Retrieves property from node
38+
// GetProperty retrieves property from node
3939
func (n Node) GetProperty(key string) interface{} {
4040
v, _ := n.Properties[key]
4141
return v
@@ -56,7 +56,7 @@ func (n Node) String() string {
5656
return s
5757
}
5858

59-
// String makes Node satisfy the Stringer interface
59+
// Encode makes Node satisfy the Stringer interface
6060
func (n Node) Encode() string {
6161
s := []string{"("}
6262

0 commit comments

Comments
 (0)