From 7e4bc199fbf8f603826bf0d4e8c43a6136a9f200 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Sat, 12 Sep 2015 19:50:56 -0700 Subject: [PATCH] Use more standard go; camel case --- server/client.go | 6 +++--- server/cmd_server.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/client.go b/server/client.go index 98a9f21..28aca56 100644 --- a/server/client.go +++ b/server/client.go @@ -64,7 +64,7 @@ type client struct { cmd string args [][]byte - is_authed bool + isAuthed bool resp responseWriter @@ -88,7 +88,7 @@ func newClient(app *App) *client { c.app = app c.ldb = app.ldb - c.is_authed = false || c.authEnabled() + c.isAuthed = false || c.authEnabled() c.db, _ = app.ldb.Select(0) //use default db return c @@ -111,7 +111,7 @@ func (c *client) perform() { err = ErrEmptyCommand } else if exeCmd, ok := regCmds[c.cmd]; !ok { err = ErrNotFound - } else if c.authEnabled() && !c.is_authed && c.cmd != "auth" { + } else if c.authEnabled() && !c.isAuthed && c.cmd != "auth" { err = ErrNotAuthenticated } else { // if c.db.IsTransaction() { diff --git a/server/cmd_server.go b/server/cmd_server.go index 04d1e04..e007545 100644 --- a/server/cmd_server.go +++ b/server/cmd_server.go @@ -20,11 +20,11 @@ func authCommand(c *client) error { } if c.app.cfg.AuthPassword == string(c.args[0]) { - c.is_authed = true + c.isAuthed = true c.resp.writeStatus(OK) return nil } else { - c.is_authed = false + c.isAuthed = false return ErrAuthenticationFailure } }