Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Jul 23, 2024
1 parent 4bf0a19 commit 3d8ce8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/mocks/mockNetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (network *MockNetwork) ClearProcessors() {
func (network *MockNetwork) RegisterHTTPHandler(path string, handler http.Handler) {
}

// RegisterHTTPHandler - empty implementation
// RegisterHTTPHandlerFunc - empty implementation
func (network *MockNetwork) RegisterHTTPHandlerFunc(path string, handler func(http.ResponseWriter, *http.Request)) {
}

Expand Down
2 changes: 1 addition & 1 deletion network/hybridNetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (n *HybridP2PNetwork) RegisterHTTPHandler(path string, handler http.Handler
n.wsNetwork.RegisterHTTPHandler(path, handler)
}

// RegisterHTTPHandler implements GossipNode
// RegisterHTTPHandlerFunc implements GossipNode
func (n *HybridP2PNetwork) RegisterHTTPHandlerFunc(path string, handlerFunc func(http.ResponseWriter, *http.Request)) {
n.p2pNetwork.RegisterHTTPHandlerFunc(path, handlerFunc)
n.wsNetwork.RegisterHTTPHandlerFunc(path, handlerFunc)

Check warning on line 152 in network/hybridNetwork.go

View check run for this annotation

Codecov / codecov/patch

network/hybridNetwork.go#L150-L152

Added lines #L150 - L152 were not covered by tests
Expand Down
1 change: 1 addition & 0 deletions network/p2p/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (s *HTTPServer) RegisterHTTPHandler(path string, handler http.Handler) {
})
}

// RegisterHTTPHandlerFunc registers a http handler with a given path.
func (s *HTTPServer) RegisterHTTPHandlerFunc(path string, handler func(http.ResponseWriter, *http.Request)) {
s.p2phttpMux.HandleFunc(path, handler)
s.p2phttpMuxRegistrarOnce.Do(func() {
Expand Down

0 comments on commit 3d8ce8b

Please sign in to comment.