Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
0いいね 20 views回再生

Error handling in Go(Golang)

In this video, we will see Go's approach to error handling which is treating errors as values with type "error", how to handle errors andalso how to create custom errors. There is a concept of "panic" and "recover" that I did not mention in this video and this is because they are most times not the appropriate approach to handling errors although there are times where "panicking" is the best approach.

Here is a link to "panic" and "recover". Check it out if you are interested in them:    • Panic and Recover in Go | Golang  

Here is also a link to the documentation for the fmt package from the standard library: https://pkg.go.dev/fmt

コメント