From 7009b0eda896295bbd9748b40fcdcf484c684b5e Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Tue, 27 Aug 2013 09:41:55 -0400 Subject: [PATCH] go fmt --- server/admin/rpc.go | 6 +++--- server/admin/users.go | 8 ++++---- server/database.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/admin/rpc.go b/server/admin/rpc.go index f970008..b50b2d1 100644 --- a/server/admin/rpc.go +++ b/server/admin/rpc.go @@ -1,9 +1,9 @@ package main import ( + "log" "net" "net/rpc" - "log" "syscall" ) @@ -13,9 +13,9 @@ func RPCCall(method string, args interface{}, reply interface{}) error { if err != nil { if err2, ok := err.(*net.OpError); ok { if err2.Err == syscall.ENOENT { - log.Fatal("The socket ("+socket+") was not found") + log.Fatal("The socket (" + socket + ") was not found") } else if err2.Err == syscall.ECONNREFUSED { - log.Fatal("A connection was refused to "+socket+". Please check the permissions and ensure the server is running.") + log.Fatal("A connection was refused to " + socket + ". Please check the permissions and ensure the server is running.") } } return err diff --git a/server/admin/users.go b/server/admin/users.go index 897776c..c0a3817 100644 --- a/server/admin/users.go +++ b/server/admin/users.go @@ -5,9 +5,9 @@ import ( "code.google.com/p/gopass" "flag" "fmt" + "net/rpc" "os" "strconv" - "net/rpc" ) type boolIsSetFlag struct { @@ -70,7 +70,7 @@ func UserAdd(args []string) { err = RPCCall("UserModifier.AddUser", user, &i) if err != nil { if _, ok := err.(rpc.ServerError); ok && err.Error() == server.DuplicateUsernameErr.Error() { - fmt.Println("Error: "+err.Error()) + fmt.Println("Error: " + err.Error()) return } panic(err) @@ -90,7 +90,7 @@ func UserDel(args []string) { err := RPCCall("UserModifier.RemoveUser", user, &i) if err != nil { if _, ok := err.(rpc.ServerError); ok && err.Error() == server.NoUserErr.Error() { - fmt.Println("Error: "+err.Error()) + fmt.Println("Error: " + err.Error()) return } panic(err) @@ -157,7 +157,7 @@ func UserMod(args []string) { err := RPCCall("UserModifier.ModifyUser", rpcargs, &i) if err != nil { if _, ok := err.(rpc.ServerError); ok && err.Error() == server.NoUserErr.Error() { - fmt.Println("Error: "+err.Error()) + fmt.Println("Error: " + err.Error()) return } panic(err) diff --git a/server/database.go b/server/database.go index 638be63..bfd8e4e 100644 --- a/server/database.go +++ b/server/database.go @@ -2,8 +2,8 @@ package server import ( "asink" - "errors" "database/sql" + "errors" _ "github.com/mattn/go-sqlite3" "sync" )