验证中...
Languages: Matlab
Categories: 嵌入式开发
Latest update 2019-07-30 22:00
snippets.json
Raw Copy
{
// Place your snippets for go here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"iepr": {
"prefix": "iepr",
"body": [
"if e !=nil {",
"\tfmt.Println(\"$1 error :\",e)",
"\treturn ",
"}$2"
]
},
"ieier":{
"prefix": "ieier",
"body": [
"if e !=nil {",
"\tLogInfo(\"$1 error :\",e)",
"\treturn ",
"}$2"
]
},
"ietr":{
"prefix": "ietr",
"body": [
"if e!=nil{",
"\tt.Error(e)",
"\treturn",
"}$1"
]
},
"ietlr":{
"prefix": "ietlr",
"body": [
"if e!=nil {",
"\tt.Log(e)",
"\treturn",
"}$1",
],
},
"ase":{
"prefix": "ase",
"body": "assert.NoError(t, e, `$1`)\n$2"
},
"ielr": {
"prefix": "ielr",
"body": [
"if e !=nil {",
"\tlogx.Error(e)",
"\treturn e",
"}$1"
]
},
"ielnr": {
"prefix": "ielnr",
"body": [
"if e !=nil {",
"\tif e!=sqlx.ErrNotFound {",
"\t\tlogx.Error(e)",
"\t}",
"\treturn ",
"}$1"
]
},
"ielpr": {
"prefix": "ielpr",
"body": [
"if e !=nil {",
"\tlogx.Error(\"$1 error :\",e)",
"\tfmt.Println(\"$1 error :\",e)",
"\treturn ",
"}$2"
]
},
"gf": {
"prefix": "gf",
"body": [
"go func() {",
"\t$1",
"}()",
]
},
"rui": {
"prefix": "rui",
"body": [
"RunOnUIThread(func(){",
"\t$1",
"})$2",
]
},
"iere":{
"prefix": "iere",
"body": [
"if e!=nil {",
"\treturn e",
"}$1",
],
},
"ienr":{
"prefix": "ienr",
"body": [
"if e==nil{",
"\treturn",
"}"
]
},
"iehsr": {
"prefix": "iehsr",
"body": [
"if e!=nil {",
"\tlogx.Error(e)",
"\tbaseresponse.HttpParamError(w,e)",
"\treturn",
"}$2"
]
},
"iehbr":{
"prefix": "iehbr",
"body": [
"if e!=nil {",
"\tlogx.Error(e)",
"\tbaseresponse.FormatResponse(nil, e, w)",
"\treturn",
"}$2",
]
},
"iehr":{
"prefix": "iehr",
"body": [
"if e!=nil{",
"\tcx.Error(e.Error(),fasthttp.StatusBadRequest)",
"\treturn",
"}$1"
]
},
"hrp":{
"prefix": "hrp",
"body": [
"baseresponse.FormatResponse(rp, e, w)",
]
},
"ie": {
"prefix": "ie",
"body": [
"if e!=nil {",
"\t$1",
"}$2"
]
},
"smap":{
"prefix": "smap",
"body": [
"type ${1:SortedMap} map[${2:int}]$3",
"func (s ${1:SortedMap}) Range(fn func(k ${2:int},v $3)){",
"\tkeys:=[]${2:int}{}",
"\tfor k:=range map[${2:int}]$3(s){",
"\t\tkeys=append(keys,k)",
"\t}",
"\tsort.Sort(sort.IntSlice(keys))",
"\tfor _,key:=range keys{",
"\t\tfn(key,s[key])",
"\t}",
"}"
]
},
"hand":{
"prefix": "hand",
"body": [
"func $1(cx *fasthttp.RequestCtx){",
"\t$2",
"}"
]
}
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search