mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
closes #1471 by adding the status command that prints the state of a machine. Signed-off-by: Sergio Botero <sergiobuj@gmail.com>
19 lines
317 B
Go
19 lines
317 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/docker/machine/log"
|
|
|
|
"github.com/codegangsta/cli"
|
|
)
|
|
|
|
func cmdStatus(c *cli.Context) {
|
|
host := getHost(c)
|
|
currentState, err := host.Driver.GetState()
|
|
if err != nil {
|
|
log.Errorf("error getting state for host %s: %s", host.Name, err)
|
|
}
|
|
fmt.Println(currentState)
|
|
}
|