rpk: consolidate plugin version validation on pkg
Define the semver pattern once in pkg/redpanda: VersionFromString parses versions from command output, and a new ValidVersion strictly validates user-supplied flags. The connect, ai, check, and k8s install commands drop their private regexes and delegate to ValidVersion. The parser now accepts any prerelease or build suffix, so upgrade can parse any version that install accepts. The ai, check, and k8s validators previously capped segments at two digits and accepted trailing garbage; both bugs are gone with the shared pattern.
R
Rogger Vasquez committed
4589f68b38d46bf24084534d6569df7ff236c326
Parent: f33878a