Does Go not have strings.HasPrefix and strings.HasSuffix functions? How to check the start and end of a string?
Hello everyone! I just started learning Go after Python and encountered an unexpected problem. In Python I was used to writing:
```python
if "hello world".startswith("hello"):
print("Starts with hello")
```
Or:
```python
if "file.txt".endswith(".txt"):
print("This is a text file")
```
But when I tried to do the same in Go, I couldn't find built-in `startswith` or `endswith` methods. I looked in the `strings` package documentation and only found `Contains`, `TrimPrefix`, `TrimSuffix`, but nothing similar to directly checking the start or end of a string.
I need to write a simple log parser where I check if a line starts with `"[ERROR]"` or ends with `"CRITICAL"`. For now I wrote a workaround:
```go
line := "[ERROR] something went wrong"
if len(line) >= 7 && lin