mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
Fix S1003 violations and drop suppression
This commit is contained in:
@@ -239,10 +239,6 @@ analyzers:
|
||||
# See above.
|
||||
- "symbol \"runtime_pollWaitCanceled\".*"
|
||||
- "symbol \"runtime_procPin\".*"
|
||||
S1003: # Replace index+len check with strings.Contains
|
||||
# disabled for now due to existing violations.
|
||||
internal:
|
||||
exclude: [".*"]
|
||||
S1004: # Simplify bytes.Compare(...) != 0 into bytes.Equal(...)
|
||||
# disabled for now due to existing violations.
|
||||
internal:
|
||||
|
||||
@@ -112,7 +112,7 @@ func (vfs *VirtualFilesystem) getFilesystemType(name string) *registeredFilesyst
|
||||
fsname := name
|
||||
// Fetch a meaningful part of name if there is a dot in the name
|
||||
// and use left part of a string as fname.
|
||||
if strings.Index(name, ".") != -1 {
|
||||
if strings.Contains(name, ".") {
|
||||
fsname = strings.Split(name, ".")[0]
|
||||
}
|
||||
return vfs.fsTypes[fsname]
|
||||
|
||||
Reference in New Issue
Block a user