shirou_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>
2022-12-20 13:13:01 +08:00
..
binary.go gofumpt 2021-12-22 21:54:41 +00:00
common.go test: use `T.Setenv` to set env vars in tests 2022-12-20 13:13:01 +08:00
common_darwin.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
common_freebsd.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
common_linux.go [android][host] fix Info() failure due to forbidden /proc/stat and /proc/uptime (#1361) 2022-11-19 04:17:18 +01:00
common_openbsd.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
common_test.go fix(host,linux): Check if path exists and is nonempty before reading host files 2022-07-15 12:25:44 +00:00
common_unix.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
common_windows.go gofumpt 2021-12-22 21:54:41 +00:00
endian.go fix(net,linux): move IsLittleEndian to internal 2022-07-04 08:41:25 +00:00
sleep.go gofumpt 2021-12-22 21:54:41 +00:00
sleep_test.go gofumpt 2021-12-22 21:54:41 +00:00
warnings.go code review 2022-10-03 13:55:14 -07:00