Skip to content

Instantly share code, notes, and snippets.

View 200sc's full-sized avatar

Patrick Stephen 200sc

  • strongDM
  • Minneapolis, MN
View GitHub Profile
@200sc
200sc / lookupFlag.go
Created August 19, 2019 12:39
How to lookup a flag from os.Args in Go
package main
import (
"fmt"
"os"
"strings"
)
func LookupFlag(name string) (value string, found bool) {
i := 0