diff options
author | Franck Cuny <franck@fcuny.net> | 2024-01-19 08:20:39 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-01-19 08:20:39 -0800 |
commit | 42a8ec8a9f743b6e8c56b8c5dd7264a70c273848 (patch) | |
tree | ff5060f9f7db2303f7a7e152251d4e36f586fa27 /snippets/go-mode | |
parent | switch to `nixd` for nix LSP (diff) | |
download | emacs.d-42a8ec8a9f743b6e8c56b8c5dd7264a70c273848.tar.gz |
add a few more snippets for go
Diffstat (limited to 'snippets/go-mode')
-rw-r--r-- | snippets/go-mode/<< | 2 | ||||
-rw-r--r-- | snippets/go-mode/iferr | 3 | ||||
-rw-r--r-- | snippets/go-mode/json | 1 | ||||
-rw-r--r-- | snippets/go-mode/struct | 5 |
4 files changed, 11 insertions, 0 deletions
diff --git a/snippets/go-mode/<< b/snippets/go-mode/<< new file mode 100644 index 0000000..03fba4a --- /dev/null +++ b/snippets/go-mode/<< @@ -0,0 +1,2 @@ +# -*- mode: snippet -*- +$1 = append(${1:theSlice}, ${2:theValue}) \ No newline at end of file diff --git a/snippets/go-mode/iferr b/snippets/go-mode/iferr new file mode 100644 index 0000000..667de41 --- /dev/null +++ b/snippets/go-mode/iferr @@ -0,0 +1,3 @@ +if err != nil { + $0 +} \ No newline at end of file diff --git a/snippets/go-mode/json b/snippets/go-mode/json new file mode 100644 index 0000000..8169d0d --- /dev/null +++ b/snippets/go-mode/json @@ -0,0 +1 @@ +\`json:"$1"\` \ No newline at end of file diff --git a/snippets/go-mode/struct b/snippets/go-mode/struct new file mode 100644 index 0000000..5327f8d --- /dev/null +++ b/snippets/go-mode/struct @@ -0,0 +1,5 @@ +#name : struct +# -- +type $1 struct { + $0 +} \ No newline at end of file |