Yep perfectly fine. MongoDB Driver for Go also uses such a wrapper at many
places where it takes a string as an argument and returns a pointer to it which
is required internally. Not really sure why use a pointer to strings in Go
because they're immutable, but I guess to reach their own.
--
Y
Hello,
I was trying to implement Substring Search using a rolling hash function
(fairly simple implementation): https://play.golang.org/p/_fjgxPC06So
This works correctly and as expected. However, if you change the const
`baseNumber` to 128, the program is unable to do the intermediate
arithme