Commit a77a6e85 authored by zs's avatar zs
Browse files

neo 包:新增节点构建方法。

parent 5fefb2ee
......@@ -52,6 +52,15 @@ func (labels Labels) Stringify() []string {
return ret
}
// Slice 返回标签切片形式。
func (labels Labels) Slice() []Label {
ret := make([]Label, 0)
for _, label := range labels {
ret = append(ret, label)
}
return ret
}
// String 返回字符串化的标签特征形式。
func (labels Labels) String() string {
ls := labels.Stringify()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment