github.com/kelleygo/clashcore@v1.0.2/component/power/event.go (about)

     1  package power
     2  
     3  type Type uint8
     4  
     5  const (
     6  	SUSPEND Type = iota
     7  	RESUME
     8  	RESUMEAUTOMATIC // Because the user is not present, most applications should do nothing.
     9  )
    10  
    11  func (t Type) String() string {
    12  	switch t {
    13  	case SUSPEND:
    14  		return "SUSPEND"
    15  	case RESUME:
    16  		return "RESUME"
    17  	case RESUMEAUTOMATIC:
    18  		return "RESUMEAUTOMATIC"
    19  	default:
    20  		return ""
    21  	}
    22  }