Added comments to exported functions
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
This commit is contained in:
parent
b0e7d001f8
commit
6579ddf9d8
|
|
@ -54,11 +54,12 @@ func (err ErrTopicNotExist) Error() string {
|
|||
return fmt.Sprintf("topic is not exist [name: %s]", err.Name)
|
||||
}
|
||||
|
||||
// TopicValidator checks topics by length and match pattern rules
|
||||
func TopicValidator(topic string) bool {
|
||||
return len(topic) <= 35 && topicPattern.MatchString(topic)
|
||||
}
|
||||
|
||||
// Remove duplicates from topics slice
|
||||
// RemoveDuplicateTopics remove duplicates from topics slice
|
||||
func RemoveDuplicateTopics(topics []string) []string {
|
||||
// Map to record duplicates
|
||||
saved := make(map[string]struct{}, len(topics))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user