You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gopsutil/internal/common
Eng Zer Jun 37894e9b28
test: use `T.Setenv` to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
..
binary.go gofumpt 3 years ago
common.go test: use `T.Setenv` to set env vars in tests 2 years ago
common_darwin.go refactor: remove unnecessary exec.LookPath calls 3 years ago
common_freebsd.go refactor: remove unnecessary exec.LookPath calls 3 years ago
common_linux.go [android][host] fix Info() failure due to forbidden /proc/stat and /proc/uptime (#1361) 3 years ago
common_openbsd.go refactor: remove unnecessary exec.LookPath calls 3 years ago
common_test.go fix(host,linux): Check if path exists and is nonempty before reading host files 3 years ago
common_unix.go refactor: remove unnecessary exec.LookPath calls 3 years ago
common_windows.go gofumpt 3 years ago
endian.go fix(net,linux): move IsLittleEndian to internal 3 years ago
sleep.go gofumpt 3 years ago
sleep_test.go gofumpt 3 years ago
warnings.go code review 3 years ago