|
|
|
|
|
by shurcooL
4703 days ago
|
|
If the language supported exceptions, how would you write this func? func (g *Gopher) DumpBinary(w io.Writer) {
// Ignore all errors
_ = binary.Write(w, binary.LittleEndian, int32(len(g.Name)))
_, _ = w.Write([]byte(g.Name))
_ = binary.Write(w, binary.LittleEndian, g.Age)
_ = binary.Write(w, binary.LittleEndian, g.FurColor)
}
|
|