mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Add custom go-mode yasnippet snippets
This commit is contained in:
6
snippets/go-mode/func
Normal file
6
snippets/go-mode/func
Normal file
@@ -0,0 +1,6 @@
|
||||
# name: func
|
||||
# key: func
|
||||
# --
|
||||
func ${1:name}($2) {
|
||||
$0
|
||||
}
|
||||
6
snippets/go-mode/interface
Normal file
6
snippets/go-mode/interface
Normal file
@@ -0,0 +1,6 @@
|
||||
# name: interface
|
||||
# key: interface
|
||||
# --
|
||||
type ${1:InterfaceName} interface {
|
||||
$0
|
||||
}
|
||||
10
snippets/go-mode/main
Normal file
10
snippets/go-mode/main
Normal file
@@ -0,0 +1,10 @@
|
||||
# name: main
|
||||
# key: main
|
||||
# --
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
$0
|
||||
}
|
||||
4
snippets/go-mode/pd
Normal file
4
snippets/go-mode/pd
Normal file
@@ -0,0 +1,4 @@
|
||||
# name: pd
|
||||
# key: pd
|
||||
# --
|
||||
fmt.Printf($0)
|
||||
4
snippets/go-mode/pdl
Normal file
4
snippets/go-mode/pdl
Normal file
@@ -0,0 +1,4 @@
|
||||
# name: pdl
|
||||
# key: pdl
|
||||
# --
|
||||
fmt.Println($0)
|
||||
6
snippets/go-mode/struct
Normal file
6
snippets/go-mode/struct
Normal file
@@ -0,0 +1,6 @@
|
||||
# name: struct
|
||||
# key: struct
|
||||
# --
|
||||
type ${1:StructName} struct {
|
||||
$0
|
||||
}
|
||||
Reference in New Issue
Block a user