mirror of
https://github.com/taigrr/bitcask
synced 2025-01-18 04:03:17 -08:00
Removed unused readConfig() (#87)
This commit is contained in:
parent
93cc1d409f
commit
1c7df7f9c7
14
bitcask.go
14
bitcask.go
@ -296,20 +296,6 @@ func (b *Bitcask) put(key, value []byte) (int64, int64, error) {
|
||||
return b.curr.Write(e)
|
||||
}
|
||||
|
||||
func (b *Bitcask) readConfig() error {
|
||||
if internal.Exists(filepath.Join(b.path, "config.json")) {
|
||||
data, err := ioutil.ReadFile(filepath.Join(b.path, "config.json"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(data, &b.config); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bitcask) writeConfig() error {
|
||||
data, err := json.Marshal(b.config)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user