MCPcopy Index your code
hub / github.com/riverqueue/river / validateQueueName

Function validateQueueName

client.go:2337–2348  ·  view source on GitHub ↗
(queueName string)

Source from the content-addressed store, hash-verified

2335var nameRegex = regexp.MustCompile(`^(?:[a-z0-9])+(?:[_|\-]?[a-z0-9]+)*$`)
2336
2337func validateQueueName(queueName string) error {
2338 if queueName == "" {
2339 return errors.New("queue name cannot be empty")
2340 }
2341 if len(queueName) > 64 {
2342 return errors.New("queue name cannot be longer than 64 characters")
2343 }
2344 if !nameRegex.MatchString(queueName) {
2345 return fmt.Errorf("queue name is invalid, expected letters and numbers separated by underscores or hyphens: %q", queueName)
2346 }
2347 return nil
2348}
2349
2350// JobDeleteManyResult is the result of a job list operation. It contains a list of
2351// jobs and a cursor for fetching the next page of results.

Callers 2

validateMethod · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…