go fmt
diff --git a/acceptance/02-list-servers.go b/acceptance/02-list-servers.go
index 77bf82f..db33203 100644
--- a/acceptance/02-list-servers.go
+++ b/acceptance/02-list-servers.go
@@ -1,9 +1,9 @@
package main
import (
+ "flag"
"fmt"
"github.com/rackspace/gophercloud"
- "flag"
)
var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
@@ -26,19 +26,19 @@
}
if !*quiet {
- fmt.Println("Id,Name")
+ fmt.Println("Id,Name")
for _, s := range servers {
- if s.AccessIPv4 != "" {
- panic("IPv4 not expected")
- }
+ if s.AccessIPv4 != "" {
+ panic("IPv4 not expected")
+ }
- if s.Status != "" {
- panic("Status not expected")
- }
+ if s.Status != "" {
+ panic("Status not expected")
+ }
- if s.Progress != 0 {
- panic("Progress not expected")
- }
+ if s.Progress != 0 {
+ panic("Progress not expected")
+ }
fmt.Printf("%s,\"%s\"\n", s.Id, s.Name)
}
@@ -52,10 +52,9 @@
}
if !*quiet {
- fmt.Println("Id,Name,AccessIPv4,Status,Progress")
+ fmt.Println("Id,Name,AccessIPv4,Status,Progress")
for _, s := range servers {
fmt.Printf("%s,\"%s\",%s,%s,%d\n", s.Id, s.Name, s.AccessIPv4, s.Status, s.Progress)
}
}
}
-
diff --git a/acceptance/03-get-server-details.go b/acceptance/03-get-server-details.go
index 9d534ef..ca00e5e 100644
--- a/acceptance/03-get-server-details.go
+++ b/acceptance/03-get-server-details.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
@@ -16,8 +16,8 @@
withIdentity(false, func(auth gophercloud.AccessProvider) {
withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
var (
- err error
- serverId string
+ err error
+ serverId string
deleteAfterwards bool
)
@@ -40,7 +40,7 @@
panic(err)
}
- configs := []string {
+ configs := []string{
"Access IPv4: %s\n",
"Access IPv6: %s\n",
" Created: %s\n",
@@ -56,7 +56,7 @@
" User ID: %s\n",
}
- values := []string {
+ values := []string{
s.AccessIPv4,
s.AccessIPv6,
s.Created,
@@ -91,7 +91,7 @@
func locateAServer(servers gophercloud.CloudServersProvider) (deleteAfter bool, id string, err error) {
ss, err := servers.ListServers()
if err != nil {
- return false, "", err
+ return false, "", err
}
if len(ss) > 0 {
diff --git a/acceptance/05-list-images.go b/acceptance/05-list-images.go
index 8120591..8cdd6c4 100644
--- a/acceptance/05-list-images.go
+++ b/acceptance/05-list-images.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
diff --git a/acceptance/06-list-flavors.go b/acceptance/06-list-flavors.go
index 5495a83..109d018 100644
--- a/acceptance/06-list-flavors.go
+++ b/acceptance/06-list-flavors.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
diff --git a/acceptance/08-reauthentication.go b/acceptance/08-reauthentication.go
index f383a30..1bcf4fc 100644
--- a/acceptance/08-reauthentication.go
+++ b/acceptance/08-reauthentication.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
diff --git a/acceptance/09-resize-server.go b/acceptance/09-resize-server.go
index b12ef4b..8582ad3 100644
--- a/acceptance/09-resize-server.go
+++ b/acceptance/09-resize-server.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
"time"
)
@@ -19,8 +19,8 @@
done := make(chan bool)
go resizeRejectTest(api, done)
go resizeAcceptTest(api, done)
- _ = <- done
- _ = <- done
+ _ = <-done
+ _ = <-done
if !*quiet {
fmt.Println("Done.")
diff --git a/acceptance/10-reboot-server.go b/acceptance/10-reboot-server.go
index 78ab357..eff9963 100644
--- a/acceptance/10-reboot-server.go
+++ b/acceptance/10-reboot-server.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
diff --git a/acceptance/11-rescue-unrescue-server.go b/acceptance/11-rescue-unrescue-server.go
index 4c4d481..657c7c8 100644
--- a/acceptance/11-rescue-unrescue-server.go
+++ b/acceptance/11-rescue-unrescue-server.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
diff --git a/acceptance/12-update-server.go b/acceptance/12-update-server.go
index 203b37d..8b9e73f 100644
--- a/acceptance/12-update-server.go
+++ b/acceptance/12-update-server.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
diff --git a/acceptance/13-rebuild-server.go b/acceptance/13-rebuild-server.go
index 12aed26..48745a6 100644
--- a/acceptance/13-rebuild-server.go
+++ b/acceptance/13-rebuild-server.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
@@ -22,8 +22,8 @@
log("Rebuilding server")
newDetails, err := servers.RebuildServer(id, gophercloud.NewServer{
- Name: randomString("ACPTTEST", 32),
- ImageRef: findAlternativeImage(),
+ Name: randomString("ACPTTEST", 32),
+ ImageRef: findAlternativeImage(),
FlavorRef: findAlternativeFlavor(),
AdminPass: randomString("", 16),
})
diff --git a/acceptance/17-create-delete-image.go b/acceptance/17-create-delete-image.go
index 1fae5ab..25d8c72 100644
--- a/acceptance/17-create-delete-image.go
+++ b/acceptance/17-create-delete-image.go
@@ -44,7 +44,7 @@
}
func log(s string) {
- if !*quiet {
- fmt.Println(s)
- }
+ if !*quiet {
+ fmt.Println(s)
+ }
}
diff --git a/acceptance/99-delete-server.go b/acceptance/99-delete-server.go
index f3639b9..55b8798 100644
--- a/acceptance/99-delete-server.go
+++ b/acceptance/99-delete-server.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"flag"
+ "fmt"
"github.com/rackspace/gophercloud"
)
@@ -42,5 +42,5 @@
fmt.Printf("%d servers removed.\n", n)
}
})
- })
+ })
}