Fix lint errors: handle errors, use fmt.Fprintf, apply De Morgan's law, use switch statements
Amp-Thread-ID: https://ampcode.com/threads/T-afcf56b0-a8bc-4310-bb59-1b63e1d70c89 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -657,7 +657,7 @@ func replaceBoundaryAware(text, oldID, newID string) string {
|
||||
func isBoundary(c byte) bool {
|
||||
// Issue IDs contain: lowercase letters, digits, and hyphens
|
||||
// Boundaries are anything else (space, punctuation, etc.)
|
||||
return !(c >= 'a' && c <= 'z' || c >= '0' && c <= '9' || c == '-')
|
||||
return (c < 'a' || c > 'z') && (c < '0' || c > '9') && c != '-'
|
||||
}
|
||||
|
||||
// isNumeric returns true if the string contains only digits
|
||||
|
||||
Reference in New Issue
Block a user