Commit Graph

4 Commits

Author SHA1 Message Date
yxxhero ac23def893 add Go lint
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-07-16 20:21:11 +08:00
Eng Zer Jun ce3b81e2a1
test: use `T.Setenv` to set env vars in tests (#189)
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-06-30 09:15:34 +09:00
yxxhero eeb2eee099 fix unittest issue for context.go
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-27 10:57:26 +08:00
yxxhero e2cb7fe176 add unittest for context.go
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-27 09:30:40 +08:00