Created
January 4, 2023 22:21
-
-
Save reetasingh/8a032754f4a3e91215a64de2f2aeb9e3 to your computer and use it in GitHub Desktop.
Medium - Retry function explanation part 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type IReader interface { | |
Read() error | |
} | |
type Reader struct { | |
} | |
// Read always throws error | |
func (r Reader) Read() error { | |
return fmt.Errorf("error in read") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment