awesome-patterns/ioreader/main.go
2018-01-21 20:53:34 +10:00

13 lines
467 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
// https://medium.com/@matryer/golang-advent-calendar-day-seventeen-io-reader-in-depth-6f744bb4320b
// Take io.Reader when you can
// If youre designing a package or utility (even if its an internal thing that nobody will ever see)
// rather than taking in strings or []byte slices, consider taking in an io.Reader if you can for data sources.
// Because suddenly, your code will work with every type that implements io.Reader.
func main() {
}