摘要: package connectdata import ( "database/sql" "fmt" "os" _ "github.com/go-sql-driver/mysql" ) func ConnectData() *sql.DB { db, err := sql.Open("mysql", 阅读全文
posted @ 2022-03-30 11:55 昌慶 阅读(170) 评论(0) 推荐(0) 编辑
摘要: package scripts import ( "bufio" "fmt" "io" "os" ) // 按行读取文件内容 func ReadFile(fileName string, contentChan chan string) { file, err := os.Open(fileName 阅读全文
posted @ 2022-03-30 11:14 昌慶 阅读(44) 评论(0) 推荐(0) 编辑