From 968430c3380bd7e19fa707db759579eae67a1764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 29 Sep 2022 22:27:16 +0800 Subject: [PATCH] Minor fixes --- common/tls/std_server.go | 1 + experimental/v2rayapi/stats.go | 1 + test/mux_cool_test.go | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/tls/std_server.go b/common/tls/std_server.go index b95101a6..3734cbf2 100644 --- a/common/tls/std_server.go +++ b/common/tls/std_server.go @@ -45,6 +45,7 @@ func newSTDServer(ctx context.Context, logger log.Logger, options option.Inbound var err error if options.ACME != nil && len(options.ACME.Domain) > 0 { tlsConfig, acmeService, err = startACME(ctx, common.PtrValueOrDefault(options.ACME)) + //nolint:staticcheck if err != nil { return nil, err } diff --git a/experimental/v2rayapi/stats.go b/experimental/v2rayapi/stats.go index 286b0b79..d3d08cd5 100644 --- a/experimental/v2rayapi/stats.go +++ b/experimental/v2rayapi/stats.go @@ -181,6 +181,7 @@ func (s *StatsService) GetSysStats(ctx context.Context, request *SysStatsRequest func (s *StatsService) mustEmbedUnimplementedStatsServiceServer() { } +//nolint:staticcheck func (s *StatsService) loadOrCreateCounter(name string, counter *atomic.Int64) *atomic.Int64 { counter, loaded := s.counters[name] if !loaded { diff --git a/test/mux_cool_test.go b/test/mux_cool_test.go index edf74832..62fa2cf4 100644 --- a/test/mux_cool_test.go +++ b/test/mux_cool_test.go @@ -55,7 +55,7 @@ func TestMuxCoolServer(t *testing.T) { }, }) - testSuit(t, clientPort, testPort) + testSuitSimple(t, clientPort, testPort) } func TestMuxCoolClient(t *testing.T) { @@ -105,7 +105,7 @@ func TestMuxCoolClient(t *testing.T) { }, }, }) - testSuit(t, clientPort, testPort) + testSuitSimple(t, clientPort, testPort) } func TestMuxCoolSelf(t *testing.T) { @@ -166,5 +166,5 @@ func TestMuxCoolSelf(t *testing.T) { }, }, }) - testSuit(t, clientPort, testPort) + testSuitSimple(t, clientPort, testPort) }