-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgo.snippet.json
67 lines (67 loc) · 1.53 KB
/
go.snippet.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[
{
"info": "go func(){\n}()",
"name": "gos1",
"text": "go func(){\n\t$$\n}()"
},
{
"info": "type name struct{\n}",
"name": "types1",
"text": "type $name$ struct {\n\t\n}"
},
{
"info": "type name interface{\n}",
"name": "types2",
"text": "type $name$ interface {\n\t\n}"
},
{
"info": "func name() {\n}",
"name": "funcs1",
"text": "func $name$() {\n\t\n}"
},
{
"info": "func() {\n}",
"name": "funcs2",
"text": "func() {\n\t$$\n}"
},
{
"info": "func() {\n}()",
"name": "funcs3",
"text": "func() {\n\t$$\n}()"
},
{
"info": "func name(w http.ResponseWriter, r *http.Request) {\n}",
"name": "handler1",
"text": "func $name$(w http.ResponseWriter, r *http.Request) {\n\t$$\n}"
},
{
"info": "import (\n)",
"name": "imports1",
"text": "import (\n\t\"$$\"\n)"
},
{
"info": "import \"C\"",
"name": "imports2",
"text": "import \"C\""
},
{
"info": "if error {\n}",
"name": "iferr1",
"text": "if err != nil {\n\t$$\n}"
},
{
"info": "if error {\n return err }",
"name": "iferr2",
"text": "if err != nil {\n\treturn err\n}"
},
{
"info": "`json:\"\"`",
"name": "json tag",
"text": "`json:\"$$\"`"
},
{
"info": "`xml:\"\"`",
"name": "xml tag",
"text": "`xml:\"$$\"`"
}
]