Posted on 25th February 2024
Golang provides a pretty simple error handling framework with an inbuild error interface. An error indicates an abnormal condition that might occur in the program. The way of handling errors is to compare the return error to nil. It indicates that there is no error in the program and a non-nil indicate the presence of error in the program. Use the syntax to find out the error:
func Open(name string) (file *File, err error)
STILL GOT QUERIES?