All languages

Go for DevOps

You're viewing a free preview. Sign in free to read every script.

Why this exists Slices and maps hold nearly all the data in a Go tool: lists of hosts, groups of log lines, inventories keyed by name. The Slices, Maps and Structs page shows the syntax. This page shows what is…

Go for DevOps: Slices and Maps in Depth, Capacity, Shared Arrays, Append Traps and Random Map Order

How slices and maps really behave, with real output: length versus capacity and growth, sub-slices that share memory, the append trap that overwrites the original, nil versus empty slices in JSON, the slices and maps packages, comma-ok, random iteration order, grouping and sets.

Sign in free to read this script, along with the rest of the library.

Sign in free