mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-08 11:10:27 +01:00
Fixed a few typos in warnigs of Redis parser.
This commit is contained in:
parent
bf55abd1b9
commit
b5d372765d
10
parser.go
10
parser.go
|
@ -159,20 +159,20 @@ func asString(i interface{}) string {
|
||||||
func (rce *RedisCommandExecutor) execute() bool {
|
func (rce *RedisCommandExecutor) execute() bool {
|
||||||
l := len(rce.args)
|
l := len(rce.args)
|
||||||
if l < 1 {
|
if l < 1 {
|
||||||
log.Printf("WARN: Too less argument for command")
|
log.Printf("WARN: Too less argument for command.")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
cmd := asString(rce.args[0])
|
cmd := asString(rce.args[0])
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "HGET":
|
case "HGET":
|
||||||
if l < 3 {
|
if l < 3 {
|
||||||
log.Println("WARN: Missing argments for HGET")
|
log.Println("WARN: Missing argments for HGET.")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
hash, ok1 := rce.args[1].([]byte)
|
hash, ok1 := rce.args[1].([]byte)
|
||||||
key, ok2 := rce.args[2].([]byte)
|
key, ok2 := rce.args[2].([]byte)
|
||||||
if !ok1 || !ok2 {
|
if !ok1 || !ok2 {
|
||||||
log.Println("WARN HGET data are not byte slices.")
|
log.Println("WARN: HGET data are not byte slices.")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return rce.commands.Hget(hash, key)
|
return rce.commands.Hget(hash, key)
|
||||||
|
@ -187,7 +187,7 @@ func (rce *RedisCommandExecutor) execute() bool {
|
||||||
value, ok3 := rce.args[3].([]byte)
|
value, ok3 := rce.args[3].([]byte)
|
||||||
|
|
||||||
if !ok1 || !ok2 || !ok3 {
|
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 false
|
||||||
}
|
}
|
||||||
return rce.commands.Hset(hash, key, value)
|
return rce.commands.Hset(hash, key, value)
|
||||||
|
@ -198,7 +198,7 @@ func (rce *RedisCommandExecutor) execute() bool {
|
||||||
case "EXEC":
|
case "EXEC":
|
||||||
return rce.commands.Exec()
|
return rce.commands.Exec()
|
||||||
}
|
}
|
||||||
log.Printf("WARN unkown command: '%s'", cmd)
|
log.Printf("WARN: unknown command: '%s'\n", cmd)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user