Files
beatglow/hardware/hardware.go
T
2026-10-29 17:28:51 +01:00

18 lines
378 B
Go

package hardware
import "errors"
// Resource is a basic resource (like an input) or a device.
type Resource interface {
// String returns the human readable name of the resource.
String() string
// Halt stops the resource.
Halt() error
}
// IsNotFound for resources that return a NotFound error.
func IsNotFound(err error) bool {
return errors.Is(err, PinNotFound{})
}