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

Skip to content

Commit db8c340

Browse files
committed
article detail bugfix
1 parent 6e2d5cf commit db8c340

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func FindArticlesById(idstr string) (curArticle *model.Article, prevNext []*mode
255255
} else if article.Id > id && article.Id < nextId {
256256
nextId = article.Id
257257
prevNext[1] = article
258-
} else {
258+
} else if article.Id == id {
259259
curArticle = article
260260
}
261261
}

websites/code/studygolang/start_crawl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ ! -f start ]; then
6+
echo 'start must be run within its container folder' 1>&2
7+
exit 1
8+
fi
9+
10+
bin/crawlarticle >> log/panic.log 2>&1 &
11+
12+
echo "start successfully"

0 commit comments

Comments
 (0)