You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
err=fmt.Errorf("invalid unit kind '%s' for unit '%s': must be one of: render, once, daemon, cron", unit.Kind, unit.Name)
82
82
return
83
83
}
84
84
85
85
// check unit name
86
86
if!regexpName.MatchString(unit.Name) {
87
-
err=errors.New("invalid unit name: "+unit.Name)
87
+
err=fmt.Errorf("invalid unit name '%s': name must start with a letter, contain only alphanumeric characters, hyphens, or underscores, and end with an alphanumeric character",unit.Name)
88
88
return
89
89
}
90
90
91
91
// check duplicated
92
92
if_, found:=names[unit.Name]; found {
93
-
err=errors.New("duplicated unit name: "+unit.Name)
93
+
err=fmt.Errorf("duplicated unit name '%s': each unit must have a unique name",unit.Name)
The minit project has been unmaintained for some time and needs careful polishing to improve robustness without breaking existing functionality. After analyzing the codebase, several areas need attention: resource management, error handling, input validation, concurrency safety, and graceful shutdown mechanisms.
0 commit comments