Functions strings.CutPrefix and strings.CutSuffix are available
since Go 1.20 and can be used instead of strings.Has* counterparts
when the latter is followed by removing the prefix or suffix.
This simplifies the code a bit, allowing for less mistakes.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>