Skip to content

Commit 63c8df3

Browse files
committed
add Vertex.Label
1 parent 1a12113 commit 63c8df3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

progress.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ type VertexInstance struct {
1414
GroupId string
1515
}
1616

17+
func (v *Vertex) Label(name string) string {
18+
for _, label := range v.Labels {
19+
if label.Name == name {
20+
return label.Value
21+
}
22+
}
23+
return ""
24+
}
25+
1726
func (v *Vertex) HasInput(o *Vertex) bool {
1827
for _, oid := range o.Outputs {
1928
if oid == v.Id {

0 commit comments

Comments
 (0)