mirror of
				https://github.com/nkanaev/yarr.git
				synced 2025-10-30 22:43:29 +00:00 
			
		
		
		
	fix atom links
This commit is contained in:
		| @@ -29,12 +29,12 @@ func (s *Storage) CreateFeed(title, description, link, feedLink string, folderId | ||||
| 		folderId, | ||||
| 	) | ||||
|  | ||||
|     var id int64 | ||||
|     err := row.Scan(&id) | ||||
|     if err != nil { | ||||
|         log.Print(err) | ||||
|         return nil | ||||
|     } | ||||
| 	var id int64 | ||||
| 	err := row.Scan(&id) | ||||
| 	if err != nil { | ||||
| 		log.Print(err) | ||||
| 		return nil | ||||
| 	} | ||||
| 	return &Feed{ | ||||
| 		Id:          id, | ||||
| 		Title:       title, | ||||
|   | ||||
| @@ -24,13 +24,13 @@ func TestCreateFeedSameLink(t *testing.T) { | ||||
| 		t.Fatal("expected feed") | ||||
| 	} | ||||
|  | ||||
|     for i := 0; i < 10; i++ { | ||||
| 	    db.CreateFeed("title", "", "", "http://example2.com/feed.xml", nil) | ||||
|     } | ||||
| 	for i := 0; i < 10; i++ { | ||||
| 		db.CreateFeed("title", "", "", "http://example2.com/feed.xml", nil) | ||||
| 	} | ||||
|  | ||||
| 	feed2 := db.CreateFeed("title", "", "http://example.com", "http://example1.com/feed.xml", nil) | ||||
| 	if feed1.Id != feed2.Id { | ||||
|         t.Fatalf("expected the same feed.\nwant: %#v\nhave: %#v", feed1, feed2) | ||||
| 		t.Fatalf("expected the same feed.\nwant: %#v\nhave: %#v", feed1, feed2) | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -17,11 +17,11 @@ func (s *Storage) CreateFolder(title string) *Folder { | ||||
| 		on conflict (title) do update set title = ? | ||||
|         returning id`, | ||||
| 		title, expanded, | ||||
|         // provide title again so that we can extract row id | ||||
|         title, | ||||
| 		// provide title again so that we can extract row id | ||||
| 		title, | ||||
| 	) | ||||
|     var id int64 | ||||
|     err := row.Scan(&id) | ||||
| 	var id int64 | ||||
| 	err := row.Scan(&id) | ||||
|  | ||||
| 	if err != nil { | ||||
| 		log.Print(err) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user