diff options
author | Julian T <julian@jtle.dk> | 2020-08-22 12:59:48 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-08-22 12:59:48 +0200 |
commit | 80fdbcbe68567dc6ad9b2f4b64c687d0ba6376b4 (patch) | |
tree | 21677171a4d30e382b4ac6a97f0e3035be36ecde /vim/.config/nvim/UltiSnips/go.snippets | |
parent | 320ea7569a64175198588e0941e580eec3ec7150 (diff) |
Ultisnippits setup
Diffstat (limited to 'vim/.config/nvim/UltiSnips/go.snippets')
-rw-r--r-- | vim/.config/nvim/UltiSnips/go.snippets | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vim/.config/nvim/UltiSnips/go.snippets b/vim/.config/nvim/UltiSnips/go.snippets new file mode 100644 index 0000000..96a9fec --- /dev/null +++ b/vim/.config/nvim/UltiSnips/go.snippets @@ -0,0 +1,14 @@ +snippet ec "if err no nil" +if err != nil { + return $1err +} +$0 +endsnippet + +snippet eh "if err no nil write http" +if err != nil { + ${1:http}.Error(w, err.Error(), http.Status${2:InternalServerError}) + return +} +$0 +endsnippet |