mirror of
https://github.com/Pungyeon/clean-go-article.git
synced 2024-11-23 14:14:05 +00:00
Update README.md
Co-Authored-By: Aleksandr Hovhannisyan <aleksandrhovhannisyan@gmail.com>
This commit is contained in:
parent
2acf6d8020
commit
6bcff141fd
|
@ -1174,7 +1174,7 @@ func NewNullWriter() io.Writer {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The above code compiles. Technically, we are implementing the interface of `Writer` on our `NullWriter`, as `NullWriter` will inherit all the functions which are associated with this interface. Some see this as a clear way of showing that our `NullWriter` is implementing the `Writer` interface, however, when using this technique we must be extra precautious.
|
The above code compiles. Technically, we are implementing the interface of `Writer` in our `NullWriter`, as `NullWriter` will inherit all the functions that are associated with this interface. Some see this as a clear way of showing that our `NullWriter` is implementing the `Writer` interface. However, we must be careful when using this technique.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
func main() {
|
func main() {
|
||||||
|
|
Loading…
Reference in a new issue