cli/pkg/iostreams
Eng Zer Jun 471cbea4fa
test: use t.Setenv to set env vars in tests (#6333)
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>

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
..
color.go Add column for listing the label color (#5462) 2022-04-14 08:51:37 +02:00
color_test.go test: use t.Setenv to set env vars in tests (#6333) 2022-09-26 08:46:02 +00:00
console.go Fix "missing method Fd" crash on Windows (#6200) 2022-09-06 17:29:06 +02:00
console_windows.go Fix "missing method Fd" crash on Windows (#6200) 2022-09-06 17:29:06 +02:00
epipe_other.go Ignore EPIPE errors when writing to a closed pager 2022-02-10 16:42:00 +01:00
epipe_windows.go Ignore EPIPE errors when writing to a closed pager 2022-02-10 16:42:00 +01:00
iostreams.go Ensure that subprocesses connect to the original os.Stdout 2022-09-14 16:47:42 +02:00
iostreams_test.go Fix closing IOStreams.Out after finishing writing to the pager (#6210) 2022-09-06 19:22:31 +02:00
tty_size.go go fmt 2021-12-02 16:12:24 +01:00
tty_size_windows.go Add ability to force terminal-style output even when redirected 2021-08-17 20:12:25 +02:00