Просмотр исходного кода

all: unused parameter should be replaced by underscore (#8989)

refactor: unused parameter should be replaced by underscore

Unused parameters in functions or methods should be replaced with `_`
(underscore) or removed.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
deepsource-autofix[bot] 2 лет назад
Родитель
Сommit
24e230d455
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      cmd/stupgrades/main.go
  2. 1 1
      lib/connections/relay_dial.go

+ 1 - 1
cmd/stupgrades/main.go

@@ -57,7 +57,7 @@ type githubReleases struct {
 	url string
 }
 
-func (p *githubReleases) ServeHTTP(w http.ResponseWriter, req *http.Request) {
+func (p *githubReleases) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
 	log.Println("Fetching", p.url)
 	rels := upgrade.FetchLatestReleases(p.url, "")
 	if rels == nil {

+ 1 - 1
lib/connections/relay_dial.go

@@ -65,7 +65,7 @@ func (d *relayDialer) Dial(ctx context.Context, id protocol.DeviceID, uri *url.U
 	return newInternalConn(tc, connTypeRelayClient, false, d.wanPriority), nil
 }
 
-func (d *relayDialer) Priority(host string) int {
+func (d *relayDialer) Priority(_ string) int {
 	return d.wanPriority
 }