https://play.golang.org/p/LNP6SK1J02V
var b64 [64]byte // 64 zero bytes var x = make([]byte, 64) fmt.Println(bytes.Equal(b64[:], x)) On Fri, Nov 15, 2019 at 7:32 PM Gert <gert.cuyk...@gmail.com> wrote: > Is it possible to write this without creating a separate var b64 first? > Basically just write it in one line? > > var b64 [64]byte // 64 zero bytes > if bytes.Equal(b64[:], x) {} > > -- > 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/52e310f4-1fd1-4eb7-833c-70c858edacad%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/52e310f4-1fd1-4eb7-833c-70c858edacad%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CANfvvbUDe5Un1G7oLJiP%2BGOYAAZOWqRRbeDGaHTj8NcqK8RvEg%40mail.gmail.com.