superfly / flyctl

Use http.NoBody instead of nil in http.NewRequest calls GO-R4001
Anti-pattern
Major
2 months agoa year old
http.NoBody should be preferred to the nil request body
241		url := fmt.Sprintf("http://%s.fly.dev/flyio/v1/settings", app.Name)
242		// url := fmt.Sprintf("http://%s.fly.dev/flyio/v1/prune?since='12h'", app.Name)
243
244		req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)245		if err != nil {
246			tracing.RecordError(span, err, "failed to create remote builder request")
247			return nil, err