MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / parseUsers

Function parseUsers

cmd/root.go:461–478  ·  view source on GitHub ↗

parseUsers parses the CRONITOR_USERS config value into a slice of usernames

()

Source from the content-addressed store, hash-verified

459
460// parseUsers parses the CRONITOR_USERS config value into a slice of usernames
461func parseUsers() []string {
462 usersConfig := viper.GetString(varUsers)
463 if usersConfig == "" {
464 return []string{} // Return empty slice for default behavior
465 }
466
467 // Split by comma and clean up each username
468 users := strings.Split(usersConfig, ",")
469 var cleanUsers []string
470 for _, user := range users {
471 user = strings.TrimSpace(user)
472 if user != "" {
473 cleanUsers = append(cleanUsers, user)
474 }
475 }
476
477 return cleanUsers
478}

Callers 5

discover.goFile · 0.85
handleGetJobsFunction · 0.85
handleGetMonitorsFunction · 0.85
handleGetCrontabsFunction · 0.85
gatherCrontabsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected