(flags networkSendFlags)
| 1982 | } |
| 1983 | |
| 1984 | func validateNetworkSendFlags(flags networkSendFlags) error { |
| 1985 | kind := strings.TrimSpace(flags.kind) |
| 1986 | if kind == networkSurfaceDirect { |
| 1987 | return errors.New("cli: --kind direct is not supported; use --surface direct with --kind say") |
| 1988 | } |
| 1989 | |
| 1990 | surface := strings.TrimSpace(flags.surface) |
| 1991 | threadID := strings.TrimSpace(flags.threadID) |
| 1992 | directID := strings.TrimSpace(flags.directID) |
| 1993 | workID := strings.TrimSpace(flags.workID) |
| 1994 | if err := validateNetworkSendConversationFlags(kind, surface, threadID, directID); err != nil { |
| 1995 | return err |
| 1996 | } |
| 1997 | return validateNetworkSendKindScope(kind, surface, threadID, directID, workID) |
| 1998 | } |
| 1999 | |
| 2000 | func validateNetworkSendConversationFlags(kind string, surface string, threadID string, directID string) error { |
| 2001 | if threadID != "" && directID != "" { |
no test coverage detected