1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Fix golint errors

This commit is contained in:
Josh Curl
2016-11-28 00:06:00 -08:00
parent fa1dc760f2
commit a7c34b9855
35 changed files with 205 additions and 212 deletions

View File

@@ -47,12 +47,12 @@ func runDocker(name string) error {
}
}
currentContainerId, err := util.GetCurrentContainerId()
currentContainerID, err := util.GetCurrentContainerID()
if err != nil {
return err
}
currentContainer, err := client.ContainerInspect(context.Background(), currentContainerId)
currentContainer, err := client.ContainerInspect(context.Background(), currentContainerID)
if err != nil {
return err
}
@@ -110,7 +110,7 @@ func common(name string) {
}
}
func PowerOff() {
func Off() {
common("poweroff")
reboot(syscall.LINUX_REBOOT_CMD_POWER_OFF)
}
@@ -181,7 +181,7 @@ func shutDownContainers() error {
return err
}
currentContainerId, err := util.GetCurrentContainerId()
currentContainerID, err := util.GetCurrentContainerID()
if err != nil {
return err
}
@@ -189,7 +189,7 @@ func shutDownContainers() error {
var stopErrorStrings []string
for _, container := range containers {
if container.ID == currentContainerId {
if container.ID == currentContainerID {
continue
}
@@ -203,7 +203,7 @@ func shutDownContainers() error {
var waitErrorStrings []string
for _, container := range containers {
if container.ID == currentContainerId {
if container.ID == currentContainerID {
continue
}
_, waitErr := client.ContainerWait(context.Background(), container.ID)