← Go Lesson 2

Lesson 2: Go Error Handling: The error Interface

8 min read

1. Q1: Why should you use errors.Is(err, io.EOF) instead of err == io.EOF?

2. Q2: What's wrong with this code?

3. Q3: Which verb wraps an error in fmt.Errorf?