{ "package line": { "body": [ "package ${TM_DIRECTORY/.+\\/(.+)$/${1:/downcase}/}", "", "$0" ], "description": "package header", "prefix": "pkg" }, "structure constructor": { "body": [ "// New$1 returns new $1.", "func New${1:type}(${2}) *$1 {", "\t$3", "\treturn &$1{$4}", "}" ], "description": "constructor for structure type", "prefix": "construct" }, "if err := ...; err != nil": { "prefix": "iferr", "body": "if err := ${1}; err != nil {\n\t${2:return ${3:nil, }${4:err}}\n}", "description": "Snippet for if err := ...; err != nil" } }