mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-26 10:05:58 +08:00
golangci-lint run
This commit is contained in:
@@ -117,8 +117,9 @@ func (r *reader) close() {
|
||||
// sync index and offset
|
||||
func (r *reader) sync() {
|
||||
name := path.Join(r.config.Path, indexFile)
|
||||
data, _ := json.Marshal(&r.checkpoint)
|
||||
_ = os.WriteFile(name, data, filePerm)
|
||||
if data, err := json.Marshal(&r.checkpoint); err == nil {
|
||||
_ = os.WriteFile(name, data, filePerm)
|
||||
}
|
||||
}
|
||||
|
||||
// restore index and offset
|
||||
|
||||
Reference in New Issue
Block a user