mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
23 lines
349 B
Go
23 lines
349 B
Go
package power
|
|
|
|
type Type uint8
|
|
|
|
const (
|
|
SUSPEND Type = iota
|
|
RESUME
|
|
RESUMEAUTOMATIC // Because the user is not present, most applications should do nothing.
|
|
)
|
|
|
|
func (t Type) String() string {
|
|
switch t {
|
|
case SUSPEND:
|
|
return "SUSPEND"
|
|
case RESUME:
|
|
return "RESUME"
|
|
case RESUMEAUTOMATIC:
|
|
return "RESUMEAUTOMATIC"
|
|
default:
|
|
return ""
|
|
}
|
|
}
|