mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 13:18:01 +08:00
19 lines
569 B
Go
19 lines
569 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
"gitee.com/johng/gf/g/container/garray"
|
|
)
|
|
|
|
func TestGFArray001(t *testing.T) {
|
|
var source = []string{"59705a2c1fd50736a4c768a1", "597a95ff1fd5073e48bb2272", "597a960f1fd5073e48bb2274"}
|
|
var CacheChannelKeys = garray.NewSortedStringArray(0)
|
|
CacheChannelKeys.Add(source...)
|
|
t.Logf("%#v\n", CacheChannelKeys)
|
|
|
|
CacheChannelKeys.Clear()
|
|
CacheChannelKeys = garray.NewSortedStringArray(len(source))
|
|
t.Logf("%#v\n", CacheChannelKeys)
|
|
CacheChannelKeys.Add(source...)
|
|
t.Logf("%#v\n", CacheChannelKeys)
|
|
} |