From 8264f400c1986382cd9fec6e3234b2e170045026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Subir=C3=A0=20Nieto?= Date: Tue, 26 Sep 2023 15:40:54 +0200 Subject: [PATCH] lint --- control/cmd/control/main.go | 3 +++ control/hiddenpaths.go | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/control/cmd/control/main.go b/control/cmd/control/main.go index 7df6f2db15..6b1cf9e2af 100644 --- a/control/cmd/control/main.go +++ b/control/cmd/control/main.go @@ -694,6 +694,9 @@ func realMain(ctx context.Context) error { // XXX(JordiSubira): Just take the first address, we only use topology.json with // information for one unique AS. hpListener, err := nc.OpenListener(a[0].String()) + if err != nil { + return serrors.WrapStr("opening listener for HP", err) + } g.Go(func() error { defer log.HandlePanic() if err := hpInterASServer.Serve(hpListener); err != nil { diff --git a/control/hiddenpaths.go b/control/hiddenpaths.go index 3d57af693f..eeee20711e 100644 --- a/control/hiddenpaths.go +++ b/control/hiddenpaths.go @@ -45,7 +45,10 @@ type HiddenPathConfigurator struct { // location. An empty location will not enable any hidden path behavior. It // returns the configuration for the hidden segment writer. The return value can // be nil if this AS isn't a writer. -func (c HiddenPathConfigurator) Setup(location string) (*grpc.Server, *HiddenPathRegistrationCfg, error) { +func (c HiddenPathConfigurator) Setup( + location string, +) (*grpc.Server, *HiddenPathRegistrationCfg, error) { + if location == "" { return nil, nil, nil }