ValidateChannel reports whether the channel matches the RFC grammar.
(channel string)
| 108 | |
| 109 | // ValidateChannel reports whether the channel matches the RFC grammar. |
| 110 | func ValidateChannel(channel string) error { |
| 111 | if !rules.ValidChannel(channel) { |
| 112 | return fmt.Errorf("%w: channel=%q", ErrInvalidField, channel) |
| 113 | } |
| 114 | return nil |
| 115 | } |
| 116 | |
| 117 | // ValidateWorkspaceID reports whether the workspace identity can safely occupy |
| 118 | // one NATS subject token and one protocol envelope field. |
no test coverage detected