aboutsummaryrefslogtreecommitdiff
path: root/cmd/xedn/main.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-02-11 19:20:27 -0500
committerXe Iaso <me@xeiaso.net>2023-02-11 19:20:53 -0500
commit5be5a8fd26bf2318201652872a42e68618f87510 (patch)
tree7750170652318a4254c1c30a85bac77422a9743e /cmd/xedn/main.go
parent74139576f516c3562dfee66837a86eb0d8b39d0c (diff)
downloadx-5be5a8fd26bf2318201652872a42e68618f87510.tar.xz
x-5be5a8fd26bf2318201652872a42e68618f87510.zip
cmd/xedn: need a writable tx
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/xedn/main.go')
-rw-r--r--cmd/xedn/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/xedn/main.go b/cmd/xedn/main.go
index 339d6ce..377c904 100644
--- a/cmd/xedn/main.go
+++ b/cmd/xedn/main.go
@@ -147,7 +147,7 @@ func (dc *Cache) Save(dir string, resp *http.Response) error {
var ErrNotCached = errors.New("data is not cached")
func (dc *Cache) Load(dir string, w io.Writer) error {
- return dc.DB.View(func(tx *bbolt.Tx) error {
+ return dc.DB.Update(func(tx *bbolt.Tx) error {
bkt := tx.Bucket([]byte(dir))
if bkt == nil {
return ErrNotCached