We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 683a2aa + 5a03d31 commit da4db68Copy full SHA for da4db68
1 file changed
validate.go
@@ -271,10 +271,13 @@ func envValid(env string) bool {
271
if len(items) < 2 {
272
return false
273
}
274
- for _, ch := range strings.TrimSpace(items[0]) {
+ for i, ch := range strings.TrimSpace(items[0]) {
275
if !unicode.IsDigit(ch) && !unicode.IsLetter(ch) && ch != '_' {
276
277
278
+ if i == 0 && unicode.IsDigit(ch) {
279
+ logrus.Warnf("Env %v: variable name beginning with digit is not recommended.", env)
280
+ }
281
282
return true
283
0 commit comments