func formatCaps(c *capability.List) string { if c == nil { return "" } return c.String() }
func (r *ReferenceUpdateRequest) encodeCommands(e *pktline.Encoder, cmds []*Command, cap *capability.List) error { if err := e.Encodef("%s\x00%s", formatCommand(cmds[0]), cap.String()); err != nil { return err } for _, cmd := range cmds[1:] { if err := e.Encodef(formatCommand(cmd)); err != nil { return err } } return e.Flush() }