@@ -354,7 +354,6 @@ func Test_Utils_SortAcceptedTypes(t *testing.T) {
354
354
{spec : "text/html" , quality : 1 , specificity : 3 , order : 0 },
355
355
{spec : "text/*" , quality : 0.5 , specificity : 2 , order : 1 },
356
356
{spec : "*/*" , quality : 0.1 , specificity : 1 , order : 2 },
357
- {spec : "application/json" , quality : 0.999 , specificity : 3 , order : 3 },
358
357
{spec : "application/xml" , quality : 1 , specificity : 3 , order : 4 },
359
358
{spec : "application/pdf" , quality : 1 , specificity : 3 , order : 5 },
360
359
{spec : "image/png" , quality : 1 , specificity : 3 , order : 6 },
@@ -363,8 +362,9 @@ func Test_Utils_SortAcceptedTypes(t *testing.T) {
363
362
{spec : "image/gif" , quality : 1 , specificity : 3 , order : 9 },
364
363
{spec : "text/plain" , quality : 1 , specificity : 3 , order : 10 },
365
364
{spec : "application/json" , quality : 0.999 , specificity : 3 , params : headerParams {"a" : []byte ("1" )}, order : 11 },
365
+ {spec : "application/json" , quality : 0.999 , specificity : 3 , order : 3 },
366
366
}
367
- sortAcceptedTypes (& acceptedTypes )
367
+ sortAcceptedTypes (acceptedTypes )
368
368
require .Equal (t , []acceptedType {
369
369
{spec : "text/html" , quality : 1 , specificity : 3 , order : 0 },
370
370
{spec : "application/xml" , quality : 1 , specificity : 3 , order : 4 },
@@ -390,7 +390,7 @@ func Benchmark_Utils_SortAcceptedTypes_Sorted(b *testing.B) {
390
390
acceptedTypes [0 ] = acceptedType {spec : "text/html" , quality : 1 , specificity : 1 , order : 0 }
391
391
acceptedTypes [1 ] = acceptedType {spec : "text/*" , quality : 0.5 , specificity : 1 , order : 1 }
392
392
acceptedTypes [2 ] = acceptedType {spec : "*/*" , quality : 0.1 , specificity : 1 , order : 2 }
393
- sortAcceptedTypes (& acceptedTypes )
393
+ sortAcceptedTypes (acceptedTypes )
394
394
}
395
395
require .Equal (b , "text/html" , acceptedTypes [0 ].spec )
396
396
require .Equal (b , "text/*" , acceptedTypes [1 ].spec )
@@ -414,7 +414,7 @@ func Benchmark_Utils_SortAcceptedTypes_Unsorted(b *testing.B) {
414
414
acceptedTypes [8 ] = acceptedType {spec : "image/*" , quality : 1 , specificity : 2 , order : 8 }
415
415
acceptedTypes [9 ] = acceptedType {spec : "image/gif" , quality : 1 , specificity : 3 , order : 9 }
416
416
acceptedTypes [10 ] = acceptedType {spec : "text/plain" , quality : 1 , specificity : 3 , order : 10 }
417
- sortAcceptedTypes (& acceptedTypes )
417
+ sortAcceptedTypes (acceptedTypes )
418
418
}
419
419
require .Equal (b , []acceptedType {
420
420
{spec : "text/html" , quality : 1 , specificity : 3 , order : 0 },
0 commit comments