Post
GoLang
Posted on 24th April 2024|31 views
How to compare errors in Golang
Posted on 24th April 2024
Go errors are the values, so we use == to compare errors with a specific value. Use the given syntax to compare error:
err.Error() == "Token is expired"
STILL GOT QUERIES?