superfly / flyctl

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
3 occurrences in this check
func runUpdate has a cyclomatic complexity of 18 with "high" risk
 68	return cmd
 69}
 70
 71func runUpdate(ctx context.Context) (err error) { 72	var (
 73		io       = iostreams.FromContext(ctx)
 74		colorize = io.ColorScheme()
func StartHeartbeat has a cyclomatic complexity of 16 with "high" risk
613
614// For remote builders send a periodic heartbeat during build to ensure machine stays alive
615// This is a noop for local builders
616func (r *Resolver) StartHeartbeat(ctx context.Context) (*StopSignal, error) {617	ctx, span := tracing.GetTracer().Start(ctx, "start_heartbeat")
618	defer span.End()
619
func newRemoteDockerClient has a cyclomatic complexity of 28 with "very-high" risk
204	}
205}
206
207func newRemoteDockerClient(ctx context.Context, apiClient *fly.Client, appCompact *fly.AppCompact, streams *iostreams.IOStreams, build *build, cachedClient *dockerclient.Client, connectOverWireguard bool) (c *dockerclient.Client, err error) {208	ctx, span := tracing.GetTracer().Start(ctx, "build_remote_docker_client", trace.WithAttributes(
209		attribute.Bool("connect_over_wireguard", connectOverWireguard),
210	))