Merge pull request #22 from alibaba/bugfix-1.2.2

update, forget mix.go
v4
Vinllen Chen 6 years ago committed by GitHub
commit 2ed72a9a05
  1. 1
      .gitignore
  2. 37
      src/pkg/rdb/mix.go

1
.gitignore vendored

@ -1,4 +1,3 @@
pkg
.gopath .gopath
.idea .idea
*.iml *.iml

@ -0,0 +1,37 @@
package rdb
func rdbLoadCheckModuleValue(l *Loader) error {
var opcode uint32
var err error
for {
if opcode, err = l.ReadLength(); err != nil {
return err
} else if opcode == rdbModuleOpcodeEof {
break
}
switch opcode {
case rdbModuleOpcodeSint:
fallthrough
case rdbModuleOpcodeUint:
if _, err = l.ReadLength(); err != nil {
return err
}
case rdbModuleOpcodeString:
if _, err = l.ReadString(); err != nil {
return err
}
case rdbModuleOpcodeFloat:
// float 32 bits
if _, err = l.ReadFloat(); err != nil {
return err
}
case rdbModuleOpcodeDouble:
// double 64 bits
if _, err = l.ReadDouble(); err != nil {
return err
}
}
}
return nil
}
Loading…
Cancel
Save