fix gotime TimeTicker issue,use sqlite3 to store wifi password

This commit is contained in:
cuu
2021-10-30 01:29:27 +08:00
parent 15e7d79b9b
commit 06f7589f8b
7 changed files with 100 additions and 32 deletions

View File

@@ -71,6 +71,20 @@ func InitSql() {
log.Printf("%q: %s\n",err,sqlStmt)
return
}
sqlStmt = `
CREATE TABLE IF NOT EXISTS wifi (
id integer PRIMARY KEY,
essid text NOT NULL,
pass text NOT NULL
);
`
_,err = db.Exec(sqlStmt)
if err != nil {
log.Printf("%q: %s\n",err,sqlStmt)
return
}
}
func main() {