all: fix some go-critic linter warnings (#23709)

This doesn't fix all go-critic warnings, just the most serious ones.

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Iskander (Alex) Sharipov
2021-10-13 18:31:02 +03:00
committed by GitHub
parent e4f570fcc6
commit 778ff94794
8 changed files with 35 additions and 38 deletions

View File

@ -218,7 +218,7 @@ func (api *privateAdminAPI) StartHTTP(host *string, port *int, cors *string, api
}
// StartRPC starts the HTTP RPC API server.
// This method is deprecated. Use StartHTTP instead.
// Deprecated: use StartHTTP instead.
func (api *privateAdminAPI) StartRPC(host *string, port *int, cors *string, apis *string, vhosts *string) (bool, error) {
log.Warn("Deprecation warning", "method", "admin.StartRPC", "use-instead", "admin.StartHTTP")
return api.StartHTTP(host, port, cors, apis, vhosts)
@ -231,7 +231,7 @@ func (api *privateAdminAPI) StopHTTP() (bool, error) {
}
// StopRPC shuts down the HTTP server.
// This method is deprecated. Use StopHTTP instead.
// Deprecated: use StopHTTP instead.
func (api *privateAdminAPI) StopRPC() (bool, error) {
log.Warn("Deprecation warning", "method", "admin.StopRPC", "use-instead", "admin.StopHTTP")
return api.StopHTTP()