- 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
27 lines
689 B
Go
27 lines
689 B
Go
//go:build windows
|
|
// +build windows
|
|
|
|
package security
|
|
|
|
import (
|
|
"runtime"
|
|
)
|
|
|
|
// checkPlatformLimits returns resource limits for Windows
|
|
func (rc *ResourceChecker) checkPlatformLimits() (*ResourceLimits, error) {
|
|
limits := &ResourceLimits{
|
|
Available: false, // Windows doesn't use Unix-style rlimits
|
|
Platform: runtime.GOOS,
|
|
}
|
|
|
|
// Windows doesn't have the same resource limit concept
|
|
// Set reasonable defaults
|
|
limits.MaxOpenFiles = 8192 // Windows default is typically much higher
|
|
limits.MaxProcesses = 0 // Not applicable
|
|
limits.MaxAddressSpace = 0 // Not applicable
|
|
|
|
rc.log.Debug("Resource limits not available on Windows", "platform", "windows")
|
|
|
|
return limits, nil
|
|
}
|