Преглед на файлове

[style] add/change comment

master
extra1563 преди 4 години
родител
ревизия
3ee24cf6d5
променени са 1 файла, в които са добавени 4 реда и са изтрити 5 реда
  1. 4
    5
      src/broker/modules/list.go

+ 4
- 5
src/broker/modules/list.go Целия файл

@@ -22,7 +22,7 @@ type valueList struct {
22 22
 }
23 23
 
24 24
 type valueNode struct {
25
-	val  []int64 // Encrypted Topic
25
+	val  []int64 // Encrypted value
26 26
 	next *valueNode
27 27
 	prev *valueNode
28 28
 
@@ -40,7 +40,7 @@ type valueNode struct {
40 40
 	range2sub_eb []int // (sub_val >= pub_val) sub#s
41 41
 }
42 42
 
43
-// To delete slice Array
43
+// To delete element in slice Array
44 44
 func remove(ary []int, i int) []int {
45 45
 	return append(ary[:i], ary[i+1:]...)
46 46
 }
@@ -56,7 +56,7 @@ func findSub(ary []int, sub int) int {
56 56
 }
57 57
 
58 58
 
59
-// Compare ->  To compare (topics, values) in a node
59
+// Compare -> To compare two encrypted arrays
60 60
 func Compare(a []int64, b []int64) int {
61 61
 	if len(a) < len(b) {
62 62
 		return 1
@@ -104,7 +104,6 @@ func (l *topicList) addTopicNode(topic []int64) {
104 104
 	l.size++
105 105
 }
106 106
 
107
-
108 107
 // To add a Value node to the Value list
109 108
 func (l *valueList) addValueNode(value []int64) {
110 109
 	newValNode := &valueNode{value, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil}
@@ -164,7 +163,7 @@ func (node *valueNode) insertSub(op string, sub int, issingle bool) {
164 163
 	}
165 164
 }
166 165
 
167
-// op와 같은 node내의 operator리스트에서 sub가 있다면 리턴
166
+// To check if sub# is in the Value node's operator list
168 167
 func (node *valueNode) findOperatorList(op string, sub int, issingle bool) int {
169 168
 	ret := -1
170 169
 	if issingle == true {

Loading…
Отказ
Запис