public_host 4 years ago
parent
commit
24ab95706e
  1. 4
      hasaki-gen-crud/hasaki-gen-crud.js
  2. 17
      test.go

4
hasaki-gen-crud/hasaki-gen-crud.js

@ -14,8 +14,8 @@ try {
// }).catch(error => {
// console.log("fix:", error);
// })
vscode.commands.executeCommand('editor.action.quickFix', vscode.Uri.file(path), new vscode.Range((new vscode.Position(0, 0)), (new vscode.Position(100, 0))));
// vscode.window.createTerminal("go:fix", "cmd.exe", ["/c", `gopls fix -a -w ${path}`])
// vscode.commands.executeCommand('editor.action.quickFix', vscode.Uri.file(path), new vscode.Range((new vscode.Position(0, 0)), (new vscode.Position(100, 0))));
vscode.window.createTerminal("go:fix", "cmd.exe", ["/c", `gopls fix -a -w ${path}`])
}

17
test.go

@ -3,27 +3,10 @@
*/
package main
import (
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb"
"xorm.io/xorm"
)
type MyTestr struct {
Id int
}
//wherePrimaryKey
func (myTestr *MyTestr) wherePrimaryKey() (q interface{}, args []interface{}) {
//todo 根据需求修改
return "`id`=?", []interface{}{
myTestr.Id,
}
}
func (myTestr *MyTestr) getXorm() *xorm.Engine {
return hskdb.GetXormAuto()
}
type MyTestr2 struct {
Id int
}

Loading…
Cancel
Save