Skip to content

Commit

Permalink
Merge pull request #2541 from traPtitech/fix-lint
Browse files Browse the repository at this point in the history
Lintが落ちるので変数/引数名を修正
  • Loading branch information
ramdos0207 authored Nov 20, 2024
2 parents 7b11184 + 1234c61 commit 0eb3907
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions service/bot/ws/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ Command:
}
}

func (s *session) sendErrorMessage(error string) {
func (s *session) sendErrorMessage(messeage string) {
_ = s.WriteMessage(&rawMessage{
t: websocket.TextMessage,
data: makeErrorMessage(error).toJSON(),
data: makeErrorMessage(messeage).toJSON(),
})
}
8 changes: 4 additions & 4 deletions service/channel/tree_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ func (n *channelNode) getChildrenIDs() []uuid.UUID {
}

func (n *channelNode) getChannelDepth() int {
max := 0
maxDepth := 0
for _, c := range n.children {
d := c.getChannelDepth()
if max < d {
max = d
if maxDepth < d {
maxDepth = d
}
}
return max + 1
return maxDepth + 1
}

func (n *channelNode) getDescendantIDs() []uuid.UUID {
Expand Down
4 changes: 2 additions & 2 deletions service/ws/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ Command:
}
}

func (s *session) sendErrorMessage(error string) {
func (s *session) sendErrorMessage(messeage string) {
_ = s.WriteMessage(&rawMessage{
t: websocket.TextMessage,
data: makeMessage("ERROR", error).toJSON(),
data: makeMessage("ERROR", messeage).toJSON(),
})
}
6 changes: 3 additions & 3 deletions utils/storage/s3_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func tests3ObjectSeek(t *testing.T) {
name string
setupFunc func(t *testing.T) *s3Object
args args
wantNewPos func(len, pos, offset int64) int64
wantNewPos func(length, pos, offset int64) int64
wantErr bool
}{
{
Expand Down Expand Up @@ -173,8 +173,8 @@ func tests3ObjectSeek(t *testing.T) {
offset: -1024,
whence: 2,
},
wantNewPos: func(len, _, offset int64) int64 {
return len + offset
wantNewPos: func(length, _, offset int64) int64 {
return length + offset
},
},
}
Expand Down

0 comments on commit 0eb3907

Please sign in to comment.