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

Method Remove

internal/devconfig/configfile/packages.go:37–45  ·  view source on GitHub ↗

Remove removes a package from the list of packages

(versionedName string)

Source from the content-addressed store, hash-verified

35
36// Remove removes a package from the list of packages
37func (pkgs *PackagesMutator) Remove(versionedName string) {
38 name, version := parseVersionedName(versionedName)
39 i := pkgs.index(name, version)
40 if i == -1 {
41 return
42 }
43 pkgs.collection = slices.Delete(pkgs.collection, i, i+1)
44 pkgs.ast.removePackage(name)
45}
46
47// AddPlatforms adds a platform to the list of platforms for a given package
48func (pkgs *PackagesMutator) AddPlatforms(writer io.Writer, versionedname string, platforms []string) error {

Callers 5

InitFunction · 0.45
TestRemovePackageObjectFunction · 0.45
TestRemovePackageArrayFunction · 0.45

Calls 3

indexMethod · 0.95
parseVersionedNameFunction · 0.85
removePackageMethod · 0.80

Tested by 4

TestRemovePackageObjectFunction · 0.36
TestRemovePackageArrayFunction · 0.36