Пример #1
0
func (inst *snapInstruction) remove() interface{} {
	flags := snappy.DoRemoveGC
	if inst.LeaveOld {
		flags = 0
	}

	return snappy.Remove(inst.pkg, flags, inst)
}
Пример #2
0
func (x *cmdRemove) doRemove(args []string) error {
	flags := snappy.DoRemoveGC
	if x.DisableGC {
		flags = 0
	}

	for _, part := range args {
		// TRANSLATORS: the %s is a pkgname
		fmt.Printf(i18n.G("Removing %s\n"), part)

		if err := snappy.Remove(part, flags, progress.MakeProgressBar()); err != nil {
			return err
		}
	}

	return nil
}