To import the fmt
package with an alias in Go, you can use the following syntax:
main.go15 chars2 lines
This will import fmt
package with alias f
, and you can then use it as f.Print()
instead of fmt.Print()
.
Here is an example:
main.go75 chars8 lines
Output:
main.go14 chars2 lines
gistlibby LogSnag