style: modernize to splitseq, cut, min, maps.copy and range-over-int
This commit is contained in:
@@ -323,8 +323,8 @@ func splitQualified(full string) (pkg, name string) {
|
||||
if idx := strings.IndexByte(full, '\u00b7'); idx >= 0 {
|
||||
return full[:idx], full[idx+len("\u00b7"):]
|
||||
}
|
||||
if idx := strings.IndexByte(full, '.'); idx >= 0 {
|
||||
return full[:idx], full[idx+1:]
|
||||
if before, after, ok := strings.Cut(full, "."); ok {
|
||||
return before, after
|
||||
}
|
||||
return "", full
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user