forked from cf-container-networking/c2c-workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgo.snippets
68 lines (53 loc) · 1.23 KB
/
go.snippets
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
# More snippets for Go
snippet println "fmt.Println(...)"
fmt.Println(${0:${VISUAL}})
endsnippet
snippet printf "fmt.Printf(format, ...)"
fmt.Printf("${1:%s}", ${0:${VISUAL}})
endsnippet
snippet desc "Ginkgo Describe" b
Describe("${1:something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet cont "Ginkgo Context" b
Context("${1:something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet bef "Ginkgo BeforeEach" b
BeforeEach(func() {
${0:${VISUAL}}
})
endsnippet
snippet aft "Ginkgo AfterEach" b
AfterEach(func() {
${0:${VISUAL}}
})
endsnippet
snippet just "Ginkgo JustBeforeEach" b
JustBeforeEach(func() {
${0:${VISUAL}}
})
endsnippet
snippet it "Ginkgo It" b
It("${1:does something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet exto "Gomega Expect(...).To(...)" b
Expect(${1:actual}).To(${0:${VISUAL}})
endsnippet
snippet exnt "Gomega Expect(...).NotTo(...)" b
Expect(${1:actual}).NotTo(${0:${VISUAL}})
endsnippet
snippet extn "Gomega Expect(...).ToNot(...)" b
Expect(${1:actual}).ToNot(${0:${VISUAL}})
endsnippet
snippet exeo "Gomega Expect(err).To(HaveOccurred())" b
Expect(err).To(HaveOccurred())
endsnippet
snippet exen "Gomega Expect(err).NotTo(HaveOccurred())" b
Expect(err).NotTo(HaveOccurred())
endsnippet
# vim:ft=snippets: