Minor fixes

This commit is contained in:
世界 2022-09-29 22:27:16 +08:00
parent 3e5bee6faf
commit 968430c338
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 5 additions and 3 deletions

View file

@ -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
}

View file

@ -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 {

View file

@ -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)
}