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 } }