@@ -53,11 +53,11 @@ func Test_HashString(t *testing.T) {
5353 expected : true ,
5454 },
5555 }
56- for _ , tt := range tests {
57- t .Run (tt .name , func (t * testing.T ) {
58- hash1 , err1 := HashString (tt .text1 )
59- hash2 , err2 := HashString (tt .text2 )
60- require .Equal (t , hash1 == hash2 , tt .expected )
56+ for _ , tc := range tests {
57+ t .Run (tc .name , func (t * testing.T ) {
58+ hash1 , err1 := HashString (tc .text1 )
59+ hash2 , err2 := HashString (tc .text2 )
60+ require .Equal (t , hash1 == hash2 , tc .expected )
6161 require .NoError (t , err1 )
6262 require .NoError (t , err2 )
6363 })
@@ -121,10 +121,10 @@ func Test_ExtractFirstJSONFromString(t *testing.T) {
121121 expected : "" ,
122122 },
123123 }
124- for _ , tt := range tests {
125- t .Run (tt .name , func (t * testing.T ) {
126- actualRes := ExtractFirstJSONFromString (tt .text )
127- require .Equal (t , tt .expected , actualRes )
124+ for _ , tc := range tests {
125+ t .Run (tc .name , func (t * testing.T ) {
126+ actualRes := ExtractFirstJSONFromString (tc .text )
127+ require .Equal (t , tc .expected , actualRes )
128128 })
129129 }
130130}
@@ -155,10 +155,10 @@ func Test_addLogWhenValExist(t *testing.T) {
155155 expected : "hello world: [slack]\n " ,
156156 },
157157 }
158- for _ , tt := range tests {
159- t .Run (tt .name , func (t * testing.T ) {
160- output := AddLogWhenValExist (tt .title , tt .val )
161- require .Equal (t , output , tt .expected )
158+ for _ , tc := range tests {
159+ t .Run (tc .name , func (t * testing.T ) {
160+ output := AddLogWhenValExist (tc .title , tc .val )
161+ require .Equal (t , output , tc .expected )
162162 })
163163 }
164164}
@@ -380,10 +380,10 @@ func Test_RedactPII(t *testing.T) {
380380 expected : `slack variables remove ...` ,
381381 },
382382 }
383- for _ , tt := range tests {
384- t .Run (tt .name , func (t * testing.T ) {
385- redacted := RedactPII (tt .text )
386- require .Equal (t , tt .expected , redacted )
383+ for _ , tc := range tests {
384+ t .Run (tc .name , func (t * testing.T ) {
385+ redacted := RedactPII (tc .text )
386+ require .Equal (t , tc .expected , redacted )
387387 })
388388 }
389389}
@@ -414,10 +414,10 @@ func Test_UpperCaseTrimAll(t *testing.T) {
414414 expected : "HELLO,WORLD" ,
415415 },
416416 }
417- for _ , tt := range tests {
418- t .Run (tt .name , func (t * testing.T ) {
419- output := UpperCaseTrimAll (tt .namedEntities )
420- require .Equal (t , output , tt .expected )
417+ for _ , tc := range tests {
418+ t .Run (tc .name , func (t * testing.T ) {
419+ output := UpperCaseTrimAll (tc .namedEntities )
420+ require .Equal (t , output , tc .expected )
421421 })
422422 }
423423}
@@ -444,10 +444,10 @@ func Test_ToHTTPS(t *testing.T) {
444444 expected : "https://www.xyz.com" ,
445445 },
446446 }
447- for _ , tt := range tests {
448- t .Run (tt .name , func (t * testing.T ) {
449- output := ToHTTPS (tt .urlAddr )
450- require .Equal (t , output , tt .expected )
447+ for _ , tc := range tests {
448+ t .Run (tc .name , func (t * testing.T ) {
449+ output := ToHTTPS (tc .urlAddr )
450+ require .Equal (t , output , tc .expected )
451451 })
452452 }
453453}
0 commit comments