refactor: improve code quality and efficiency in various files #548

Merged
lunny merged 5 commits from appleboy/tea:lint into main 2023-04-30 03:43:27 +00:00

5 Commits

Author SHA1 Message Date
bdc8fa97ef Merge branch 'main' into lint
All checks were successful
check-and-test / check-and-test (pull_request) Successful in 30s
2023-04-30 11:02:04 +08:00
710d98eb8e Merge branch 'main' into lint
All checks were successful
check-and-test / check-and-test (pull_request) Successful in 32s
2023-04-29 09:36:59 +08:00
358f1ae64e test: improve test coverage and API compatibility
All checks were successful
check-and-test / check-and-test (pull_request) Successful in 35s
- Add a new test file `parse_test.go` in `modules/utils` directory

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-04-29 08:28:15 +08:00
b78ae28c11 chore: improve functionality and testing across platforms
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 2m9s
- Update golang.org/x/term dependency version

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-04-29 08:03:12 +08:00
6f789aff56 refactor: improve code quality and efficiency in various files
Some checks failed
check-and-test / check-and-test (pull_request) Failing after 1m40s
- Replace loadConfig() with _ = loadConfig()
- Update file permissions from 0660 to 0o660
- Simplify variable declarations
- Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term
- Remove unused getCertPrincipals function
- Replace time.Now().Sub() with time.Since()
- Add test for ArgToIndex function

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-04-29 08:01:35 +08:00