ci(golangci): enable comprehensive linting and update variable initialization

- Add a `.golangci.yaml` configuration file with various linters enabled and specific settings for `gosec` and `perfsprint`.
- Change `isTimeout` from being initialized to `true` to being declared as a `bool` variable without an initial value in `plugin.go`.

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2024-11-16 09:58:21 +08:00
parent 1edb4744ca
commit 2519a9a894
2 changed files with 43 additions and 1 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ func (p Plugin) exec(host string, wg *sync.WaitGroup, errChannel chan error) {
return
}
// read from the output channel until the done signal is passed
isTimeout := true
var isTimeout bool
loop:
for {
select {