Unused code SCC-U1000
Bug risk
Major
59 occurrences in this check
208	return ech, nil
209}
210
211func (*run) PreStop(context.Context) error {212	return nil
213}
214
219	return r.server.Shutdown(ctx)
220}
221
222func (*run) PostStop(context.Context) error {223	return nil
224}
229	return ech, nil
230}
231
232func (*run) PreStop(context.Context) error {233	return nil
234}
235
199	return r.server.Shutdown(ctx)
200}
201
202func (*run) PostStop(context.Context) error {203	return nil
204}
188	return ech, nil
189}
190
191func (*run) PreStop(context.Context) error {192	return nil
193}
194
 69	return s, nil
 70}
 71
 72func (*server) Start(context.Context) { 73}
 74
 75func (s *server) Pods(ctx context.Context, req *payload.Discoverer_Request) (*payload.Info_Pods, error) {
266	return ech, nil
267}
268
269func (*run) PreStop(context.Context) error {270	return nil
271}
272
268	return r.server.Shutdown(ctx)
269}
270
271func (*run) PostStop(context.Context) error {272	return nil
273}
167	return ech, nil
168}
169
170func (b *bs) Stop(context.Context) error {171	if b.bucket != nil {
172		return b.bucket.Close()
173	}
388	return p.Signal(syscall.SIGTERM)
389}
390
391func (o *observer) requestBackup(context.Context) error {392	select {
393	case o.ch <- struct{}{}:
394	default:
19	DefaultStartFunc = func(context.Context) (<-chan error, error) {
20		return nil, nil
21	}
22	DefaultPushFunc = func(context.Context, JobFunc) error {23		return nil
24	}
25	DefaultPopFunc = func(context.Context) (JobFunc, error) {
22	DefaultPushFunc = func(context.Context, JobFunc) error {
23		return nil
24	}
25	DefaultPopFunc = func(context.Context) (JobFunc, error) {26		return nil, nil
27	}
28	DefaultLenFunc = func() uint64 {
16import "context"
17
18var (
19	DefaultStartFunc = func(context.Context) (<-chan error, error) {20		return nil, nil
21	}
22	DefaultPushFunc = func(context.Context, JobFunc) error {
19	DefaultStartFunc = func(context.Context) (<-chan error, error) {
20		return nil, nil
21	}
22	DefaultPushFunc = func(context.Context, JobFunc) error {23		return nil
24	}
25	DefaultPopFunc = func(context.Context) (JobFunc, error) {
138	return opts, nil
139}
140
141func (s *srvs) setupHealthCheck(*tls.Config) ([]servers.Option, error) {142	opts := make([]servers.Option, 0, len(s.cfg.HealthCheckServers))
143	for _, hsc := range s.cfg.HealthCheckServers {
144		srv, err := server.New(
75	return t, nil
76}
77
78func (*tracer) Start(context.Context) error {79	otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
80	return nil
81}
148	return nil
149}
150
151func (*observability) Start(context.Context) <-chan error {152	return nil
153}
154
59	}, nil
60}
61
62func (*grpcServerMetrics) Register(metrics.Meter) error {63	// The metrics are dynamically registered at the grpc server interceptor package,
64	// so do nothing in this part
65	return nil
67func (*nopLogger) Fatalf(string, ...interface{}) {}
68
69// Fatald logs the message with details at Fatal level, then calls os.Exit(1).
70func (*nopLogger) Fatald(string, ...interface{}) {}71
72// Close calls finalizer of logger implementations.
73func (*nopLogger) Close() error {
67func (*nopLogger) Fatalf(string, ...interface{}) {}
68
69// Fatald logs the message with details at Fatal level, then calls os.Exit(1).
70func (*nopLogger) Fatald(string, ...interface{}) {}71
72// Close calls finalizer of logger implementations.
73func (*nopLogger) Close() error {
64func (*nopLogger) Fatal(...interface{}) {}
65
66// Fatalf logs the formatted message at Fatal level, then calls os.Exit(1).
67func (*nopLogger) Fatalf(string, ...interface{}) {}68
69// Fatald logs the message with details at Fatal level, then calls os.Exit(1).
70func (*nopLogger) Fatald(string, ...interface{}) {}
64func (*nopLogger) Fatal(...interface{}) {}
65
66// Fatalf logs the formatted message at Fatal level, then calls os.Exit(1).
67func (*nopLogger) Fatalf(string, ...interface{}) {}68
69// Fatald logs the message with details at Fatal level, then calls os.Exit(1).
70func (*nopLogger) Fatald(string, ...interface{}) {}
61func (*nopLogger) Errord(string, ...interface{}) {}
62
63// Fatal logs the vals at Fatal level, then calls os.Exit(1).
64func (*nopLogger) Fatal(...interface{}) {}65
66// Fatalf logs the formatted message at Fatal level, then calls os.Exit(1).
67func (*nopLogger) Fatalf(string, ...interface{}) {}
58func (*nopLogger) Errorf(string, ...interface{}) {}
59
60// Errord logs the message with details at Error level.
61func (*nopLogger) Errord(string, ...interface{}) {}62
63// Fatal logs the vals at Fatal level, then calls os.Exit(1).
64func (*nopLogger) Fatal(...interface{}) {}
58func (*nopLogger) Errorf(string, ...interface{}) {}
59
60// Errord logs the message with details at Error level.
61func (*nopLogger) Errord(string, ...interface{}) {}62
63// Fatal logs the vals at Fatal level, then calls os.Exit(1).
64func (*nopLogger) Fatal(...interface{}) {}