MCPcopy Index your code
hub / github.com/jetify-com/devbox / parseVersionedName

Function parseVersionedName

internal/devconfig/configfile/packages.go:363–372  ·  view source on GitHub ↗

parseVersionedName parses the name and version from package@version representation

(versionedName string)

Source from the content-addressed store, hash-verified

361
362// parseVersionedName parses the name and version from package@version representation
363func parseVersionedName(versionedName string) (name, version string) {
364 var found bool
365 name, version, found = searcher.ParseVersionedPackage(versionedName)
366 if !found {
367 // Case without any @version in the versionedName
368 // We deliberately do not set version to `latest`
369 return versionedName, "" /*version*/
370 }
371 return name, version
372}
373
374// packagesFromLegacyList converts a list of strings to a list of packages
375// Example inputs: `["python@latest", "hello", "cowsay@1"]`

Callers 13

AddMethod · 0.85
RemoveMethod · 0.85
AddPlatformsMethod · 0.85
ExcludePlatformsMethod · 0.85
SetPatchMethod · 0.85
SetDisablePluginMethod · 0.85
SetOutputsMethod · 0.85
SetAllowInsecureMethod · 0.85
packagesFromLegacyListFunction · 0.85
GetPackageMethod · 0.85
migratePackagesArrayMethod · 0.85
packageElementIndexMethod · 0.85

Calls 1

ParseVersionedPackageFunction · 0.92

Tested by 1

TestParseVersionedNameFunction · 0.68