@@ -13,7 +13,7 @@ func TestTarget_GetOperator(t1 *testing.T) {
13
13
m ["anonymous" ] = false
14
14
type fields struct {
15
15
Identifier string
16
- Name * string
16
+ Name string
17
17
Anonymous bool
18
18
Attributes map [string ]interface {}
19
19
}
@@ -29,42 +29,42 @@ func TestTarget_GetOperator(t1 *testing.T) {
29
29
}{
30
30
{name : "boolean operator" , fields : struct {
31
31
Identifier string
32
- Name * string
32
+ Name string
33
33
Anonymous bool
34
34
Attributes map [string ]interface {}
35
- }{Identifier : "harness" , Name : & harness , Anonymous : false , Attributes : m },
35
+ }{Identifier : "harness" , Name : harness , Anonymous : false , Attributes : m },
36
36
args : struct { attr string }{attr : "anonymous" }, want : types .Boolean (false )},
37
37
{name : "string operator" , fields : struct {
38
38
Identifier string
39
- Name * string
39
+ Name string
40
40
Anonymous bool
41
41
Attributes map [string ]interface {}
42
- }{Identifier : "harness" , Name : & harness , Anonymous : false , Attributes : nil },
42
+ }{Identifier : "harness" , Name : harness , Anonymous : false , Attributes : nil },
43
43
args : struct { attr string }{attr : "identifier" }, want : types .String ("harness" )},
44
44
{name : "int operator" , fields : struct {
45
45
Identifier string
46
- Name * string
46
+ Name string
47
47
Anonymous bool
48
48
Attributes map [string ]interface {}
49
- }{Identifier : "harness" , Name : & harness , Anonymous : false , Attributes : map [string ]interface {}{
49
+ }{Identifier : "harness" , Name : harness , Anonymous : false , Attributes : map [string ]interface {}{
50
50
"order" : 1 ,
51
51
}},
52
52
args : struct { attr string }{attr : "order" }, want : types .Integer (1 )},
53
53
{name : "number operator" , fields : struct {
54
54
Identifier string
55
- Name * string
55
+ Name string
56
56
Anonymous bool
57
57
Attributes map [string ]interface {}
58
- }{Identifier : "harness" , Name : & harness , Anonymous : false , Attributes : map [string ]interface {}{
58
+ }{Identifier : "harness" , Name : harness , Anonymous : false , Attributes : map [string ]interface {}{
59
59
"weight" : 99.99 ,
60
60
}},
61
61
args : struct { attr string }{attr : "weight" }, want : types .Number (99.99 )},
62
62
{name : "empty operator" , fields : struct {
63
63
Identifier string
64
- Name * string
64
+ Name string
65
65
Anonymous bool
66
66
Attributes map [string ]interface {}
67
- }{Identifier : "harness" , Name : nil , Anonymous : false , Attributes : map [string ]interface {}{}},
67
+ }{Identifier : "harness" , Anonymous : false , Attributes : map [string ]interface {}{}},
68
68
args : struct { attr string }{attr : "" }, want : nil },
69
69
}
70
70
for _ , tt := range tests {
@@ -94,7 +94,7 @@ func TestTarget_GetAttrValue(t1 *testing.T) {
94
94
95
95
type fields struct {
96
96
Identifier string
97
- Name * string
97
+ Name string
98
98
Anonymous bool
99
99
Attributes map [string ]interface {}
100
100
}
@@ -109,17 +109,17 @@ func TestTarget_GetAttrValue(t1 *testing.T) {
109
109
}{
110
110
{name : "check identifier" , fields : struct {
111
111
Identifier string
112
- Name * string
112
+ Name string
113
113
Anonymous bool
114
114
Attributes map [string ]interface {}
115
- }{Identifier : identifier , Name : & name , Anonymous : false , Attributes : types.JSON {}},
115
+ }{Identifier : identifier , Name : name , Anonymous : false , Attributes : types.JSON {}},
116
116
args : struct { attr string }{attr : "identifier" }, want : reflect .ValueOf (identifier )},
117
117
{name : "check attributes" , fields : struct {
118
118
Identifier string
119
- Name * string
119
+ Name string
120
120
Anonymous bool
121
121
Attributes map [string ]interface {}
122
- }{Identifier : "john" , Name : & name , Anonymous : false , Attributes : types.JSON {
122
+ }{Identifier : "john" , Name : name , Anonymous : false , Attributes : types.JSON {
123
123
"email" : email ,
124
124
}},
125
125
args : struct { attr string }{attr : "email" }, want : reflect .ValueOf (email )},
@@ -145,7 +145,7 @@ func TestTarget_GetOperator1(t1 *testing.T) {
145
145
m ["anonymous" ] = false
146
146
type fields struct {
147
147
Identifier string
148
- Name * string
148
+ Name string
149
149
Anonymous bool
150
150
Attributes map [string ]interface {}
151
151
}
@@ -163,33 +163,33 @@ func TestTarget_GetOperator1(t1 *testing.T) {
163
163
}{
164
164
{name : "bool operator" , fields : struct {
165
165
Identifier string
166
- Name * string
166
+ Name string
167
167
Anonymous bool
168
168
Attributes map [string ]interface {}
169
- }{Identifier : "john" , Name : & name , Anonymous : false , Attributes : types.JSON {"anonymous" : false }},
169
+ }{Identifier : "john" , Name : name , Anonymous : false , Attributes : types.JSON {"anonymous" : false }},
170
170
args : struct { attr string }{attr : "anonymous" }, want : types .Boolean (false )},
171
171
{name : "string operator" , fields : struct {
172
172
Identifier string
173
- Name * string
173
+ Name string
174
174
Anonymous bool
175
175
Attributes map [string ]interface {}
176
- }{Identifier : "john" , Name : & name , Anonymous : false , Attributes : types.JSON {}},
176
+ }{Identifier : "john" , Name : name , Anonymous : false , Attributes : types.JSON {}},
177
177
args : struct { attr string }{attr : "identifier" }, want : types .String ("john" )},
178
178
{name : "number operator" , fields : struct {
179
179
Identifier string
180
- Name * string
180
+ Name string
181
181
Anonymous bool
182
182
Attributes map [string ]interface {}
183
- }{Identifier : "john" , Name : & name , Anonymous : false , Attributes : types.JSON {
183
+ }{Identifier : "john" , Name : name , Anonymous : false , Attributes : types.JSON {
184
184
"height" : 186.5 ,
185
185
}},
186
186
args : struct { attr string }{attr : "height" }, want : types .Number (186.5 )},
187
187
{name : "integer operator" , fields : struct {
188
188
Identifier string
189
- Name * string
189
+ Name string
190
190
Anonymous bool
191
191
Attributes map [string ]interface {}
192
- }{Identifier : "john" , Name : & name , Anonymous : false , Attributes : types.JSON {
192
+ }{Identifier : "john" , Name : name , Anonymous : false , Attributes : types.JSON {
193
193
"zip" : 90210 ,
194
194
}},
195
195
args : struct { attr string }{attr : "zip" }, want : types .Integer (90210 )},
0 commit comments