Merge pull request #23 from alibaba/feature-1.2

Feature 1.2
v4
Vinllen Chen 6 years ago committed by GitHub
commit b56c394468
  1. 1
      .gitignore
  2. 37
      src/pkg/rdb/mix.go

1
.gitignore vendored

@ -1,4 +1,3 @@
pkg
.gopath
.idea
*.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