- Learning Functional Programming in Go
- Lex Sheehan
- 50字
- 2021-07-02 23:13:51
Example usages of the Reader and Writer interfaces
The Hash interface from Go's standard library is composed of the io.Writer interface and four others. Therefore, Hash can be used anywhere the io.Writer interface is required:
type Hash interface {
io.Writer
Sum(b []byte) []byte
Reset()
Size() int
BlockSize() int
}