To turn the given function into a one-liner, you can remove unnecessary whitespaces and put everything on a single line. Here's the one-liner version:
main.go104 chars4 lines
This code achieves the same functionality as the original code but is written as a concise one-liner.
gistlibby LogSnag