I would recommend reading up on how to implement Go interfaces.
The only requirement required to satisfy the io.Writer interface is a
method Write([]byte)(int,error). If this method is present, Go can then
interpret your struct as a io.Writer.
By itself, io.Writer provides no functionality only
In general, no. Each time you pass around a []byte you are actually passing
around a copy of a pointer to the slice. Modifications will affect the
underlying slice.
You can use arrays instead, which are always PBV.
Take care though, if you try to pass an array to a function accepting a
slice vi
Another option for this is if your function is always called after the call to
the external library, you can change your function signature to match the
return value of the external library.
Its quite common to see something like this:
`
func A() (int, error) {}
func UseA(a int, err error) (in
To this day the most prevalent, evasive and destructive malware is developed
in C/C++... So may as well ban those languages too!!
Seriously, if your answer to 'stopping malware written in Go' is to ban all
applications written in Go, your security team needs some more training budget
or you