From 4d5b158bb4245f0f5b58aa4e894f69d6079b4d27 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 15 May 2022 13:55:02 -0700 Subject: snippets: for go-mode --- emacs/etc/snippets/go-mode/method | 8 ++++++++ emacs/etc/snippets/go-mode/test | 7 +++++++ emacs/etc/snippets/go-mode/type | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 emacs/etc/snippets/go-mode/method create mode 100644 emacs/etc/snippets/go-mode/test create mode 100644 emacs/etc/snippets/go-mode/type (limited to 'emacs/etc/snippets/go-mode') diff --git a/emacs/etc/snippets/go-mode/method b/emacs/etc/snippets/go-mode/method new file mode 100644 index 0000000..78e61fc --- /dev/null +++ b/emacs/etc/snippets/go-mode/method @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: method +# key: method +# -- +// $2 ${5:...} +func (${1:recv}) ${2:name}(${3:args}) $4 { + $0 +} \ No newline at end of file diff --git a/emacs/etc/snippets/go-mode/test b/emacs/etc/snippets/go-mode/test new file mode 100644 index 0000000..3140ec2 --- /dev/null +++ b/emacs/etc/snippets/go-mode/test @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: test +# key: test +# -- +func Test$1(t *testing.T) { + $0 +} \ No newline at end of file diff --git a/emacs/etc/snippets/go-mode/type b/emacs/etc/snippets/go-mode/type new file mode 100644 index 0000000..d8b2004 --- /dev/null +++ b/emacs/etc/snippets/go-mode/type @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: type +# key: type +# -- +// $3 +type $1 $2 { + $0 +} \ No newline at end of file -- cgit 1.4.1