A Go library for managing power states.
If you would like the library:
go get github.com/stephen-fox/power
Or if you would like the command line application:
go get github.com/stephen-fox/power/command
Restart- Restarts the machineShutdown- Shuts the machine downSleep- Puts the machine to sleep
Example: power -h
Specify action with second argument: <application> [-s, -r, -o]
-s Sleep the machine
-r Restart the machine
-o Power the machine off