stringset:一组用go编写的并发安全字符串
弦集
stringset为golang中的字符串创建并发安全的集合
安装
go get -u github.com/axamon/stringset
用法
package main
import (
"fmt"
"github.com/axamon/stringset"
)
func main () {
testSet := NewStringSet ( "pippo" , "pluto" , "paperino" , "pippo" )
slice := testSet . Strings ()
sort . Strings ( slice )
for _ , element := range slice {
fmt . Println ( element )
}
// Output:
// paperino
// pippo