mirror of
https://github.com/kubernetes/client-go.git
synced 2026-01-14 03:54:56 +00:00
**What this PR does / why we need it**: The User-Agent reported by clients (e.g. kubectl) in request headers should include the name of the client executable but not the full path to that executable. This PR changes how this name is determined by using the operating-system specific package "path/filepath" (meant for working with file system paths) instead of the "path" package (meant for URL paths). This fixes a problem on the Windows OS in the case where, if the user has not set their PATH to point to the location of their client executable, the User-Agent unnecessarily includes the full path. Fixes: #44419 Kubernetes-commit: 04f993250bc7a1aef0f2874d440ddb4bec1012c5