Go (Golang) io.MultiWriter Tutorial

preview_player
Показать описание
Go (Golang) io.MultiWriter Tutorial

In this episode we are going to go through an example on how we can use the powerful io.Writer interface and most importantly the io.MultiWriter utility function from the Go standard library to improve our Go codebase. In this case we are going to try write multiple files just by using a single io.Writer resulting from the concatenation of multiple io.Writers from the io.MultiWriter func. This can be particularly useful if you want to duplicate a file whilst it's being written for backup or debug purposes.

Рекомендации по теме
Комментарии
Автор

just a cool vim tip, you don’t need to be inside the string to type: ci” you can be at the beginning of the line and do it and it’ll change the first string it finds (I saw you moving to be inside the string and I also did that until very recently)

Gabzim
Автор

I should eventually start seriously reading through the documentations to learn clever ways to write Go code. That if statement in the MultiWriter implementation is far from straight forward at least to a Java boi like me

GolangDojo
visit shbcf.ru