Fixed a few typos in warnigs of Redis parser.

This commit is contained in:
Sascha L. Teichmann 2014-08-07 20:25:48 +02:00
parent bf55abd1b9
commit b5d372765d

View File

@ -159,20 +159,20 @@ func asString(i interface{}) string {
func (rce *RedisCommandExecutor) execute() bool {
l := len(rce.args)
if l < 1 {
log.Printf("WARN: Too less argument for command")
log.Printf("WARN: Too less argument for command.")
return false
}
cmd := asString(rce.args[0])
switch cmd {
case "HGET":
if l < 3 {
log.Println("WARN: Missing argments for HGET")
log.Println("WARN: Missing argments for HGET.")
return false
}
hash, ok1 := rce.args[1].([]byte)
key, ok2 := rce.args[2].([]byte)
if !ok1 || !ok2 {
log.Println("WARN HGET data are not byte slices.")
log.Println("WARN: HGET data are not byte slices.")
return false
}
return rce.commands.Hget(hash, key)
@ -187,7 +187,7 @@ func (rce *RedisCommandExecutor) execute() bool {
value, ok3 := rce.args[3].([]byte)
if !ok1 || !ok2 || !ok3 {
log.Printf("WARM HSET data are not byte slices,")
log.Println("WARN: HSET data are not byte slices.")
return false
}
return rce.commands.Hset(hash, key, value)
@ -198,7 +198,7 @@ func (rce *RedisCommandExecutor) execute() bool {
case "EXEC":
return rce.commands.Exec()
}
log.Printf("WARN unkown command: '%s'", cmd)
log.Printf("WARN: unknown command: '%s'\n", cmd)
return false
}