Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists Go compiles to one static binary, which is why so much DevOps tooling is written in it. A command line tool needs the same few things every time: flags, input from a file or a pipe, output to standard…
A Command-Line Tool: Flags, Standard Input and Exit Codes
Build a real log analyser with the flag package that reads a file or standard input, counts log levels, prints results and exits with the right code. Structured so the logic is testable and main stays tiny.
Sign in free to read this script, along with the rest of the library.
Sign in free