http://play.golang.org/p/CZTmhNepkM
Can someone explain why we need bytes? For example, in a playgound game, I do the same, but a packet of strings is easier than using bytes. Why would anyone need a byte package for HasSuffix functions while we have a string package?
strings.HasSuffix(word, "ed")
bytes.HasSuffix(word_byte, []byte("ed"))
user2671513
source
share