(kind string, surface string, threadID string, directID string, workID string)
| 2032 | } |
| 2033 | |
| 2034 | func validateNetworkSendKindScope(kind string, surface string, threadID string, directID string, workID string) error { |
| 2035 | if networkKindForbidsConversation(kind) && (surface != "" || threadID != "" || directID != "" || workID != "") { |
| 2036 | return fmt.Errorf("cli: --kind %s cannot include --surface, --thread, --direct, or --work", kind) |
| 2037 | } |
| 2038 | if networkKindRequiresWork(kind) && workID == "" { |
| 2039 | return fmt.Errorf("cli: --kind %s requires --work", kind) |
| 2040 | } |
| 2041 | return nil |
| 2042 | } |
| 2043 | |
| 2044 | func networkKindForbidsConversation(kind string) bool { |
| 2045 | switch kind { |
no test coverage detected