diff --git a/internal/common/common_linux.go b/internal/common/common_linux.go index 7dc53c4..01ae751 100644 --- a/internal/common/common_linux.go +++ b/internal/common/common_linux.go @@ -55,7 +55,6 @@ func NumProcs() (uint64, error) { } func BootTimeWithContext(ctx context.Context) (uint64, error) { - system, role, err := Virtualization() if err != nil { return 0, err @@ -202,7 +201,6 @@ func VirtualizationWithContext(ctx context.Context) (string, string, error) { if PathExists(filepath.Join(filename, "self", "status")) { contents, err := ReadLines(filepath.Join(filename, "self", "status")) if err == nil { - if StringsContains(contents, "s_context:") || StringsContains(contents, "VxID:") { system = "linux-vserver" diff --git a/load/load_linux.go b/load/load_linux.go index 38b4b03..0859397 100644 --- a/load/load_linux.go +++ b/load/load_linux.go @@ -103,7 +103,6 @@ func MiscWithContext(ctx context.Context) (*MiscStat, error) { default: continue } - } procsTotal, err := getProcsTotal() diff --git a/load/load_test.go b/load/load_test.go index 2c809b9..d2739ba 100644 --- a/load/load_test.go +++ b/load/load_test.go @@ -70,7 +70,6 @@ func TestMiscStatString(t *testing.T) { } func BenchmarkLoad(b *testing.B) { - loadAvg := func(t testing.TB) { v, err := Avg() skipIfNotImplementedErr(t, err)