https://github.com/doggy8088/go-extension-pack#readme
- Go Snippets
- code skeleton
pkgm: package main and main functionhelloweb: sample hello world webapp
- code patterns
sort: customsort.Sortinterface implementation
- function/method
func:functiondeclarationfmain: main functionfinit: init functiongo: anonymousgoroutinedeclaration
meth:methoddeclaration
- imports
im:importstatementims:importblock
- declarations
var:variabledeclarationco:constantdeclarationcos:constantblock declarationin: emptyinterfacetyi: typeinterfacedeclarationtys: typestructdeclarationmap:mapdeclarationgf:goroutinedeclaration
- statements
if: if statementel: else statementie: if-else statementiferr: if err != nilswitch: switch statementcs: case clause
for: for statementforr: for range statementsel: select statementmake: make statementnew: new statementdf: defer statementch: channelpn: panic
- fmt
fp: fmt.Println()ff: fmt.Printf()
- log
lp: log.Println()lf: log.Printf()lv: log.Printf() with variable content
- net/http
hf: http.HandleFunc()hand: http handler declarationwr: http Responserd: http.Redirect()herr: http.Error()
las: http.ListenAndServe()sv: http.Serve()
- testing
- function template
tdt: table driven test functiontf: Test functionbf: Benchmark functionef: Example function
- common api
tl: t.Log()tlf: t.Logf()tlv: t.Logf() with variable content
- function template
- code skeleton