Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Go strings are supposed to be immutable.

I see that fiber goes behind your back and produces potentially mutable strings behind your back: https://github.com/gofiber/utils/blob/c338034/convert.go#L18

And… I actually don't have an issue with it to be honest. I've done the same myself.

But this mutability should never escape. I'd never persist in using a library that would let it escape. But apparently… it's intentional: https://github.com/gofiber/fiber/issues/185

Oh well. You get what you ask for. Please don't complain about maps if you're using a broken library.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: