Closed titaneric closed 3 years ago
準備可以review了,但CI好像有go build的問題要幫忙看一下
@titaneric CI 裡的問題是 #37 及 https://github.com/Ptt-official-app/go-bbs/pull/58#issuecomment-789741746 提到的 module declare,注意到 development 分支在剛剛已經修正了。
可以再幫我 pull 一次 development 嗎?
簡單在 merge current development 後的版本,透過 golangci-lint 跑 golint,發現幾個漏網之魚,提供參考:
$ golangci-lint run
cache/systemvshm.go:50:2: var `shmId` should be `shmID` (golint)
shmId, err := Shmget(key, size, flag)
^
cache/systemvshm.go:95:2: var `shmId` should be `shmID` (golint)
shmId, err := Shmget(key, 0, 0)
^
cache/systemvshm.go:112:1: receiver name m should be consistent with previous receiver name s for SHM (golint)
func (m *SHM) Close() error {
^
pttbbs/board.go:69:23: method BoardId should be BoardID (golint)
func (b *BoardHeader) BoardId() string { return b.BoardID() }
^
pttbbs/cache.go:14:2: struct field `posOfUserId` should be `posOfUserID` (golint)
posOfUserId int
^
pttbbs/cache.go:297:17: method UserId should be UserID (golint)
func (c *Cache) UserId(uid int) string {
^
感謝 @minchao 與 @PichuChen ,目前CI過囉,再麻煩幫忙review
@titaneric 剩下最後一個 receiver 修改就過 lint 囉
% golangci-lint run
cache/systemvshm.go:112:1: receiver name m should be consistent with previous receiver name s for SHM (golint)
func (m *SHM) Close() error {
^
👏 解決掉的 issue / Resolved Issues
⛏ 變更內容 / Details of Changes