func initSQL() { if !checkFileExist(config.SQLDatabase) { fmt.Printf("%s not found, please run first ffetch\n", config.SQLDatabase) } else { cursor, _ = sqlite3.Open(config.SQLDatabase) } }
func initSQL() { cursor, _ = sqlite3.Open(config.SQLDatabase) query := "CREATE TABLE IF NOT EXISTS feed(" + "id INTEGER PRIMARY KEY," + "site TEXT," + "title TEXT UNIQUE," + "link TEXT," + "date INTEGER," + "read INTEGER);" cursor.Exec(query) }