You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop WHAT-style enumerations and inline comments that restated the code.
The handler godoc keeps the only non-obvious bit (the legacy fallback
WHY); the route registration in server.go and the field-by-field comment
on the Deprecation header lose redundant prose. Helper godoc shrinks to
one line about the resolved-pair return convention.
logger.Warnf(r.Context(), "legacy /dl/ form %s:%s resolved via fallback to %s:%s — caller should migrate to /dl/%s/%s", name, ref, useName, useRef, useName, useRef)
72
+
logger.Warnf(r.Context(), "legacy /dl/ form %s:%s resolved via fallback to %s:%s", name, ref, useName, useRef)
81
73
}
82
74
83
75
m, err:=manifest.Parse(raw)
@@ -99,9 +91,8 @@ func (s *Server) handleArtifactDownload(w http.ResponseWriter, r *http.Request)
99
91
}
100
92
}
101
93
102
-
// fetchManifestWithLegacyFallback tries (name, ref) first; on 404 retries
103
-
// (name+"/"+ref, "latest"). Returns the (name, ref) pair that resolved so
104
-
// the caller can flag deprecation. Non-404 errors short-circuit immediately.
94
+
// fetchManifestWithLegacyFallback returns the resolved (name, ref) so the
95
+
// caller can detect when the fallback path fired.
0 commit comments