Can append or the compiler be made to prevent or warn for bugs like this?
package main
import (
"fmt"
)
func main() {
a := []byte("Help")
b := append(a, []byte(" Me ")...)
c := append(a, []byte(" Her")...)
fmt.Println(string(a), "-", string(b), "-", string(c))
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.