Created
February 4, 2015 06:05
-
-
Save aybabtme/6bf2edacedabc7445c38 to your computer and use it in GitHub Desktop.
Most useful GoSublime snippet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"snippets": [ | |
{ | |
"text": "sortby", | |
"title": "type bySomeOrder []type", | |
"value": "type $1 []$2\n\nfunc(b $1) Len() int { return len(b) }\nfunc(b $1) Swap(i, j int) { b[i],b[j] = b[j],b[i] }\nfunc(b $1) Less(i, j int) bool { return b[i].$3 < b[j].$3 }" | |
}, | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment