CyberStrikeAI/internal/storage/usage_other.go

17 lines
453 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//go:build !linux
package storage
// errPlatformUnsupported 由调用方转换为 Available=false,不视为致命错误。
var errPlatformUnsupported = &unsupportedPlatformError{}
type unsupportedPlatformError struct{}
func (e *unsupportedPlatformError) Error() string {
return "filesystem usage query is only supported on linux"
}
func filesystemUsage(path string) (Filesystem, error) {
return Filesystem{Path: path}, errPlatformUnsupported
}