一、安装包
项目根目录下控制台,输入。
go get -u github.com/easierway/concurrent_map
二、引用包
import cm "github.com/easierway/concurrent_map"
三、使用包
import ( cm "github.com/easierway/concurrent_map" "testing" ) func TestConcurrentMap(t *testing.T) { m := cm.CreateConcurrentMap(99) m.Set(cm.StrKey("key"), 10) t.Log(m.Get(cm.StrKey("key"))) }
=== RUN TestConcurrentMap remote_package_test.go:11: 10 true --- PASS: TestConcurrentMap (0.00s) PASS