shirou_gopsutil/process
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
..
testdata Drop test for Darwin Pids() 2022-01-13 13:27:05 +01:00
process.go Spelling and grammar fixes 2022-01-30 22:48:09 +02:00
process_bsd.go gofumpt 2021-12-22 21:54:41 +00:00
process_darwin.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_darwin_amd64.go gofumpt 2021-12-22 21:54:41 +00:00
process_darwin_arm64.go gofumpt 2021-12-22 21:54:41 +00:00
process_darwin_cgo.go Fix memory leaks in darwin_cgo 2022-10-04 14:35:52 -04:00
process_darwin_nocgo.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_fallback.go [process] implement ParentWithContext using PpidWithContext 2022-01-22 18:27:52 +02:00
process_freebsd.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_freebsd_386.go run go fmt ./... 2017-02-01 23:05:29 +00:00
process_freebsd_amd64.go run go fmt ./... 2017-02-01 23:05:29 +00:00
process_freebsd_arm.go Add native struct support for FreeBSD/arm. 2017-02-01 08:25:48 -08:00
process_freebsd_arm64.go gofumpt 2021-12-22 21:54:41 +00:00
process_linux.go fix(process,linux): remove trailing multiple \x00 2022-07-12 09:49:23 +00:00
process_linux_test.go test: use `T.Setenv` to set env vars in tests 2022-12-20 13:13:01 +08:00
process_openbsd.go refactor: remove unnecessary exec.LookPath calls 2022-03-04 18:56:33 +02:00
process_openbsd_386.go gofumpt 2021-12-22 21:54:41 +00:00
process_openbsd_amd64.go run go fmt ./... 2017-02-01 23:05:29 +00:00
process_openbsd_arm.go host: add support for OpenBSD/armv7 2022-04-15 21:11:36 +02:00
process_openbsd_arm64.go gofumpt 2021-12-22 21:54:41 +00:00
process_plan9.go [process] implement ParentWithContext using PpidWithContext 2022-01-22 18:27:52 +02:00
process_posix.go gofumpt 2021-12-22 21:54:41 +00:00
process_posix_test.go gofumpt 2021-12-22 21:54:41 +00:00
process_race_test.go gofumpt 2021-12-22 21:54:41 +00:00
process_solaris.go [process] implement ParentWithContext using PpidWithContext 2022-01-22 18:27:52 +02:00
process_test.go [process][windows] Retrieve process name as basename of executable 2022-10-22 21:43:23 +02:00
process_windows.go [process][windows] Retrieve process name as basename of executable 2022-10-22 21:43:23 +02:00
process_windows_32bit.go [process][windows] Fix #1216 fix compilation on arm/arm64 2022-01-05 01:09:23 +01:00
process_windows_64bit.go [process][windows] Fix #1216 fix compilation on arm/arm64 2022-01-05 01:09:23 +01:00
types_darwin.go gofumpt 2021-12-22 21:54:41 +00:00
types_freebsd.go gofumpt 2021-12-22 21:54:41 +00:00
types_openbsd.go gofumpt 2021-12-22 21:54:41 +00:00