Visualize Go slices and arrays

Expore the connection between slices and arrays by generating diagrams from Go code.

  1. 1
    Play with the code in the editor below.
  2. 2
    Pass arrays and slices to the Visualize function.
    The signature of this function looks like Visualize(vals ...any). The values must be slices or pointers to arrays.
  3. 3
    Click the visualize button to update the diagram.
editor

Options

output

      

Make privacy claims you can back up

Join 800+ subscribers.
One email every few weeks.

I share what I learn building privacy-friendly systems. From confidential computing to Verbond and the occasional Go tip or trick. You can unsubscribe at any time.

Avatar of the author
Willem Schots