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

      

Career choice: Have a solution when trust runs out*

Join 800+ devs reading my newsletter

*Political, social and economical trust keeps eroding. AI is adding non-deterministic fuel to the fire.

I'm currently building attested.systems. Proof-driven systems where no trust is required (in software at least). Join me on this journey.

Avatar of the author
Willem Schots