In Go, to import the "os" package with a blank identifier, you can use the following code snippet:
main.go14 chars2 lines
The blank identifier is represented by an underscore character. This tells the Go compiler to import the package, but not to assign it to a variable. This is useful if you just need to execute a package's initialization functions, but you don't need to use any of its exported symbols directly in your code.
gistlibby LogSnag