fix: use fixed version of pebble driver

This commit is contained in:
Ash Keel 2023-11-11 15:13:25 +01:00
parent f910d83c06
commit e535f89efc
No known key found for this signature in database
GPG Key ID: 53A9E9A6035DD109
5 changed files with 12 additions and 7 deletions

View File

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## current
### Fixed
- Fixed bug in 3.0.0 where kilovolt would not detect inexistant keys and break on new installs
### Changed
- Updated Kilovolt with a new websocket library
@ -93,6 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your user to make sure it has a necessary new permission for event notifications to work (even from 3.1.0).
### Fixed
- Fixed issue where event notification would not work due to Twitch deprecating the `channel.follows` V1 topic
- Fixed more database leaks

View File

@ -109,6 +109,9 @@ func (mod *LocalDBClient) SubscribeKey(key string, fn func(string)) (err error,
func (mod *LocalDBClient) GetJSON(key string, dst any) error {
res, err := mod.GetKey(key)
if err != nil {
if errors.Is(err, kv.ErrorKeyNotFound) {
return ErrEmptyKey
}
return err
}
if res == "" {

View File

@ -8,9 +8,9 @@ import (
"git.sr.ht/~ashkeel/strimertul/utils"
pebble_driver "git.sr.ht/~ashkeel/kilovolt-driver-pebble"
"github.com/cockroachdb/pebble"
kv "github.com/strimertul/kilovolt/v11"
pebble_driver "github.com/strimertul/kv-pebble"
"go.uber.org/zap"
)

3
go.mod
View File

@ -4,6 +4,7 @@ go 1.21
require (
git.sr.ht/~ashkeel/containers v0.3.6
git.sr.ht/~ashkeel/kilovolt-driver-pebble v1.2.4
github.com/Masterminds/sprig/v3 v3.2.3
github.com/apenwarr/fixconsole v0.0.0-20191012055117-5a9f6489cc29
github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb
@ -14,7 +15,6 @@ require (
github.com/nicklaw5/helix/v2 v2.25.2
github.com/postfinance/single v0.0.2
github.com/strimertul/kilovolt/v11 v11.0.1
github.com/strimertul/kv-pebble v1.2.3
github.com/urfave/cli/v2 v2.25.7
github.com/wailsapp/wails/v2 v2.6.0
go.uber.org/zap v1.26.0
@ -72,7 +72,6 @@ require (
github.com/samber/lo v1.38.1 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/strimertul/kilovolt/v10 v10.0.0 // indirect
github.com/tkrajina/go-reflector v0.5.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect

6
go.sum
View File

@ -1,5 +1,7 @@
git.sr.ht/~ashkeel/containers v0.3.6 h1:+umWlQGKhLxGQlaEUt/F6rBZGpeBd1T01fM3wro+qTY=
git.sr.ht/~ashkeel/containers v0.3.6/go.mod h1:i2KocnJfRH0FwfgPi4nw7/ehYLEoLlP3iwdDoBeVdME=
git.sr.ht/~ashkeel/kilovolt-driver-pebble v1.2.4 h1:8QdCTq8HOHEM4wCZVXlvnUJ8dogSnzZTNzsjkj0vE0Y=
git.sr.ht/~ashkeel/kilovolt-driver-pebble v1.2.4/go.mod h1:VTObrB2pDpjT6JhcSwf4D5RWUy5udFPpAKrOgOXh6hs=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
@ -163,12 +165,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/strimertul/kilovolt/v10 v10.0.0 h1:VGUFZ1/s4IDAYp9kqZQosoelRqXA/cN2JP41BgLc4yQ=
github.com/strimertul/kilovolt/v10 v10.0.0/go.mod h1:lB+aF6VpoMfxkK+DFVzIB9yOW0nNaZOtFt395Cf+Hyk=
github.com/strimertul/kilovolt/v11 v11.0.1 h1:fV33Z3b168LeSROzzV0dZcI2Jptg3TvF2FbEGxfEVGI=
github.com/strimertul/kilovolt/v11 v11.0.1/go.mod h1:PjhGVWb74lB8dXSGWA7GmVSbZAoGV/WGGmjS2Zz/UBg=
github.com/strimertul/kv-pebble v1.2.3 h1:SnSuJUTJePSWbac5DQXy3Jl7f647jkqqzpQbwqdftCE=
github.com/strimertul/kv-pebble v1.2.3/go.mod h1:OaPhe8OtIlZUmpOfmTKtDzAB/P/T0ngCtWCwp9Isa3U=
github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=