Why *bytes.IndexByte *can not find '\n' in multiline string? package main
import ( "bytes" "fmt" ) func main() { t1 := []byte("TEST\n") t2 := []byte(`TEST\n`) t3 := byte('\n') fmt.Println(t1) fmt.Println(t2) fmt.Println(t3) fmt.Println(bytes.IndexByte(t1, t3)) fmt.Println(bytes.IndexByte(t2, t3)) } -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/925e3a5a-0775-44a4-8428-42b077a6be1dn%40googlegroups.com.