共 4 篇文章 |
|
bulkwrite 批量插入。rt : begin->prepare->(in loop exec)->commit.tx, err := connect.Begin()checkErr(err)stmt, err := tx.Prepare("INSERT INTO example (country_code, os_id, browser_id, categories, action_day, action_time) VALUES (?, ?, ?, ?, ?, ?)")checkErr(err)i++ { if _, err := stmt.Exec( "RU&q... 阅66 转0 评0 公众公开 21-03-18 14:58 |
package mainimport ( "github.com/hpcloud/tail" "fmt" "time")func main() { filename := "/Users/zhaofan/go_project/src/go_dev/13/tailf/my.log" tails,err := tail.package mainimport ( "github.com/astaxie/beego/logs" "encoding/json" "fmt")func main() { c... 阅71 转0 评0 公众公开 21-03-18 13:37 |
Reader output string write bool // second section - struct selection offset int structName string line string start, end int // third section - struct modification remove []string add []string override bool transform string sort bool clear bool addOpts []string removeOpts []string clearOpt bool}Node) bool { // rewrite... 阅58 转0 评0 公众公开 21-03-17 20:16 |
Go标准库之html/template。func (t *Template) Parse(src string) (*Template, error)func ParseFiles(filenames ...string) (*Template, error)func ParseGlob(pattern string) (*Template, error)Println("create template failed, err:", err) return } jsStr := `<script>alert('''''... 阅137 转0 评0 公众公开 21-03-17 17:45 |