some cleanup
This commit is contained in:
@ -48,8 +48,10 @@ func (d *db) IsNewFeed() bool {
|
||||
|
||||
func NewDB(storageDir, feedName string) (DB, error) {
|
||||
dbPath := path.Join(storageDir, fmt.Sprintf("%s.csv", feedName))
|
||||
db := db{dbPath: dbPath}
|
||||
db.seenLinks = map[string]struct{}{}
|
||||
db := db{
|
||||
dbPath: dbPath,
|
||||
seenLinks: map[string]struct{}{},
|
||||
}
|
||||
f, err := os.Open(dbPath)
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
|
Reference in New Issue
Block a user