ci: add golangci-lint config and fix formatting
- Add .golangci.yml with minimal linters (govet, ineffassign) - Run gofmt -s and goimports on all files to fix formatting - Disable fieldalignment and copylocks checks in govet
This commit is contained in:
@@ -54,7 +54,7 @@ func CheckDiskSpace(path string) *DiskSpaceCheck {
|
||||
func CheckDiskSpaceForRestore(path string, archiveSize int64) *DiskSpaceCheck {
|
||||
check := CheckDiskSpace(path)
|
||||
requiredBytes := uint64(archiveSize) * 4 // Account for decompression
|
||||
|
||||
|
||||
// Override status based on required space
|
||||
if check.AvailableBytes < requiredBytes {
|
||||
check.Critical = true
|
||||
@@ -64,7 +64,7 @@ func CheckDiskSpaceForRestore(path string, archiveSize int64) *DiskSpaceCheck {
|
||||
check.Warning = true
|
||||
check.Sufficient = false
|
||||
}
|
||||
|
||||
|
||||
return check
|
||||
}
|
||||
|
||||
@@ -108,4 +108,4 @@ func FormatDiskSpaceMessage(check *DiskSpaceCheck) string {
|
||||
}
|
||||
|
||||
return msg
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user