func IsDeviceStillAttached(err error) bool {
	switch err.(type) {
	case *DeviceStillAttachedError:
		return true
	}
	return false
}
IsDeviceStillAttached check if this error is a device still attached error
package packet
import "fmt"
type WrongDeviceAttachmentError struct {
	deviceID string
}
func (w WrongDeviceAttachmentError) Error() string {
	return fmt.Sprintf("Attached to wrong device: %s", w.deviceID)
}
func IsWrongDeviceAttachment(err error) bool {
	switch err.(type) {
	case *WrongDeviceAttachmentError:
		return true
	}
	return false
}
type TooManyDevicesAttachedError struct {
	deviceIDs []string
}
func (t TooManyDevicesAttachedError) Error() string {
	return fmt.Sprintf("Attached to multiple devices: %v", t.deviceIDs)
}
func IsTooManyDevicesAttached(err error) bool {
	switch err.(type) {
	case *TooManyDevicesAttachedError:
		return true
	}
	return false
}
type DeviceStillAttachedError struct{}
func (d DeviceStillAttachedError) Error() string {
	return "Cannot delete when still attached"
}