示例#1
0
func (f FlowEntry) String() string {
	a := make([]interface{}, len(f.Actions))
	for i := range f.Actions {
		a[i] = f.Actions[i]
	}
	astr := strings.Join(a, ",")
	return fmt.Sprintf("flow(%v=>%v,node=%v,priority=%v,idleto=%v,hardto=%v)",
		f.Match, astr, f.Node, f.Priority, f.IdleTimeout, f.HardTimeout)
}
示例#2
0
func (m Match) String() string {
	l := len(m.Fields)
	if l == 0 {
		return "match(*)"
	}
	a := make([]interface{}, len(m.Fields))
	for i := range m.Fields {
		a[i] = m.Fields[i]
	}
	return fmt.Sprintf("match(%v)", strings.Join(a, ","))
}