change: remove namespace

This commit is contained in:
debugtalk
2021-12-22 21:04:20 +08:00
parent a36232b734
commit 745a29a379
4 changed files with 39 additions and 91 deletions
-26
View File
@@ -1,9 +1,7 @@
package boomer
import (
"fmt"
"math"
"sort"
"testing"
)
@@ -108,27 +106,3 @@ func TestConsoleOutput(t *testing.T) {
o.OnStop()
}
func TestSortString(t *testing.T) {
stats := []struct {
method string
name string
}{
{"transaction", "Action"},
{"request-GET", "get with params"},
{"request-POST", "post form data"},
{"request-POST", "post json data"},
{"transaction", "tran1"},
}
sort.Slice(stats, func(i, j int) bool {
if stats[i].method < stats[j].method {
return true
}
return stats[i].name < stats[j].name
})
fmt.Println(stats)
}