1 Star 0 Fork 0

monitor / go-bindata

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
AppendSliceValue.go 503 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ian Kent 提交于 2014-04-29 23:42 . Add support for -ignore
package main
import "strings"
// borrowed from https://github.com/hashicorp/serf/blob/master/command/agent/flag_slice_value.go
// AppendSliceValue implements the flag.Value interface and allows multiple
// calls to the same variable to append a list.
type AppendSliceValue []string
func (s *AppendSliceValue) String() string {
return strings.Join(*s, ",")
}
func (s *AppendSliceValue) Set(value string) error {
if *s == nil {
*s = make([]string, 0, 1)
}
*s = append(*s, value)
return nil
}
1
https://gitee.com/cqjsc_admin/go-bindata.git
git@gitee.com:cqjsc_admin/go-bindata.git
cqjsc_admin
go-bindata
go-bindata
v3.0.7

搜索帮助

53164aa7 5694891 3bd8fe86 5694891