This commit is contained in:
@@ -62,7 +62,7 @@ func (s *Store) Close() {
|
||||
s.db.Close()
|
||||
}
|
||||
|
||||
func (s *Store) MarkUrlSeen(url string) {
|
||||
func (s *Store) MarkURLSeen(url string) {
|
||||
q := fmt.Sprintf(`INSERT into %s (url, posted) VALUES (?, date('now'));`, tablename)
|
||||
_, err := s.db.Exec(q, url)
|
||||
if err != nil {
|
||||
@@ -75,7 +75,7 @@ func (s *Store) MarkUrlSeen(url string) {
|
||||
Msg("url added to db")
|
||||
}
|
||||
|
||||
func (s *Store) UrlAlreadySeen(url string) bool {
|
||||
func (s *Store) URLAlreadySeen(url string) bool {
|
||||
q := fmt.Sprintf(`select id from %s where url = ?;`, tablename)
|
||||
|
||||
row := s.db.QueryRow(q, url)
|
||||
|
||||
Reference in New Issue
Block a user