Skip to content

Commit

Permalink
Update senml.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ftylitak authored Nov 1, 2023
1 parent 7fa6652 commit 345a704
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions senml.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ func validateName(name string) error {
if (l == '-') || (l == ':') || (l == '.') || (l == '/') || (l == '_') {
return ErrBadChar
}
for _, l := range name {
if (l < 'a' || l > 'z') && (l < 'A' || l > 'Z') && (l < '0' || l > '9') && (l != '-') && (l != ':') && (l != '.') && (l != '/') && (l != '_') {
return ErrBadChar
}
}
// for _, l := range name {
// if (l < 'a' || l > 'z') && (l < 'A' || l > 'Z') && (l < '0' || l > '9') && (l != '-') && (l != ':') && (l != '.') && (l != '/') && (l != '_') {
// return ErrBadChar
// }
// }
return nil
}

0 comments on commit 345a704

Please sign in to comment.