Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6583b05

Browse files
committed
bugfix
1 parent 0aa1efb commit 6583b05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

websites/code/studygolang/src/service/article.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func FindArticlesById(idstr string) (curArticle *model.Article, prevNext []*mode
246246
}
247247

248248
prevNext = make([]*model.Article, 2)
249-
prevId, nextId := articles[0], id
249+
prevId, nextId := articles[0].Id, id
250250
for _, article := range articles {
251251
if article.Id < id && article.Id > prevId {
252252
prevId = article.Id

0 commit comments

Comments
 (0)