-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve configuration feature for glog/ghttp.Server
- Loading branch information
Showing
10 changed files
with
173 additions
and
111 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,12 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/gogf/gf/frame/g" | ||
"github.com/gogf/gf/os/glog" | ||
"fmt" | ||
"regexp" | ||
) | ||
|
||
func AddAPKCmdTask11(assistantId int, cmd int32, cmdData []byte, FromClientId string, desc string, priority int, status int32, cmdkey string) (int64, error) { | ||
//var res, err = g.DB("test").Insert("assistant_tasks", g.Map{ | ||
// "assistant_id": assistantId, | ||
// "cmd": cmd, | ||
// "cmdData": cmdData, | ||
// "status": status, | ||
// "FromClientId": FromClientId, | ||
// "desc": desc, | ||
// "priority": priority, | ||
// "cmdkey": cmdkey, | ||
//}) | ||
var res, err = g.DB("test").Table("assistant_tasks").Data(g.Map{ | ||
"assistant_id": assistantId, | ||
"cmd": cmd, | ||
"cmdData": cmdData, | ||
"status": status, | ||
"FromClientId": FromClientId, | ||
"desc": desc, | ||
"priority": priority, | ||
"cmdkey": cmdkey, | ||
}).Insert() | ||
|
||
if err != nil { | ||
glog.Error("插入手机任务队列报错", err.Error()) | ||
return 0, err | ||
} | ||
taskId, err := res.LastInsertId() | ||
return taskId, err | ||
} | ||
|
||
func main() { | ||
g.DB().SetDebug(true) | ||
AddAPKCmdTask11(1, 2058, []byte(""), "", "", 60, 0, "") | ||
replaceCharReg, err := regexp.Compile(`[\-\.\_\s]+`) | ||
fmt.Println(err) | ||
fmt.Println(replaceCharReg.ReplaceAllString("s--s.s.a b", "")) | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.