【文件属性】:
文件名称:go-string-set:一种在GoLang中创建字符串集的方法
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-03 16:24:02
Go
概述
通过字符串设置方法。
用法
go get github.com/wojnosystems/go-string-set
package main
import (
"github.com/wojnosystems/go-string-set/string_set"
"strings"
)
func main () {
myPeople := string_set . New ()
myPeople . Add ( "Bob" )
myPeople . Add ( "Jane" )
myPeople . Add ( "Gary" )
myPeople . Add ( "Bob" )
if myPeople . Exists ( "Bob" ) {
// Bob exists in myPeople, so this code block execute
【文件预览】:
go-string-set-main
----go.mod(98B)
----go.sum(1003B)
----string_set()
--------interface.go(3KB)
--------string_set.go(2KB)
--------string_set_test.go(11KB)
--------action.go(209B)
----README.md(2KB)
----.gitignore(7B)