fix: linter issue
megacheck, gosimple and unused has been deprecated and subsumed by staticcheck. And staticcheck also has been upgraded. we need to update code for the linter issue. close: #2945 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -19,6 +19,6 @@ package progress
|
||||
const (
|
||||
escape = "\x1b"
|
||||
reset = escape + "[0m"
|
||||
red = escape + "[31m" // nolint: unused, varcheck
|
||||
red = escape + "[31m" // nolint: staticcheck, varcheck
|
||||
green = escape + "[32m"
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@ func RequiresRootM() {
|
||||
fmt.Fprintln(os.Stderr, "skipping test that requires root")
|
||||
os.Exit(0)
|
||||
}
|
||||
if 0 != os.Getuid() {
|
||||
if os.Getuid() != 0 {
|
||||
fmt.Fprintln(os.Stderr, "This test must be run as root.")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user