storage: 🐛 memcache utils.Trim undefined latest release
Using go.mod with:
github.com/gofiber/fiber/v2 v2.38.1
github.com/gofiber/storage/memcache v0.0.0-20221005114327-4e6f1c95ff26
When trying to run I get
# github.com/gofiber/storage/memcache
../go/pkg/mod/github.com/gofiber/storage/memcache@v0.0.0-20221027071415-dca8f183e44b/memcache.go:24:36: undefined: utils.Trim
if I change memcache.go line 23 from serverList := strings.Split(utils.Trim(cfg.Servers, ' '), ",")
to serverList := strings.Split(strings.Trim(cfg.Servers, " "), ",")
it works.
@efectn mentioned utils.Trim was used for performance on older go versions. It seems that this is broken with the latest goofier release when using go 1.19 in my package however.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (21 by maintainers)
Commits related to this issue
- fix: utils.Trim undefined latest release go 1.19 fixes: #591 — committed to sixcolors/storage by sixcolors 2 years ago
confirmed working using test project https://github.com/sixcolors/gofiber-storage-memcache-modtest
I’m happy with either, since both resolve the issue. ✅
I think v2 would be better for new changes. And we can release v1.0.1 from old v0.1.2 tag
Would be really good if we could find out the cause If the problem is not fixable then gladly with the standard package, but I would find it better to research first to exclude other errors in other packages