cleanup
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 34s

This commit is contained in:
matst80
2025-05-16 07:18:32 +02:00
parent ccd4bf56e1
commit d65c9f6998
2 changed files with 3 additions and 10 deletions

View File

@@ -40,15 +40,7 @@ func (ds *DiskStorage) Put(key string, data []byte) error {
if err := ds.ensureDir(); err != nil {
return err
}
f, err := os.Open(path.Join(ds.dir, key))
if err != nil {
return err
}
_, err = f.Write(data)
if err != nil {
return err
}
return f.Close()
return os.WriteFile(path.Join(ds.dir, key), data, 0644)
}
func (ds *DiskStorage) Delete(key string) error {