Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Go

Idiom #243 Print list

Print the contents of the list or array a on the standard output.

import "fmt"
fmt.Println(a)

a is a slice.
This works fine for simple types and structs.
It won't dereference pointers.
(print a)

New implementation...