clean

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskToRemoveDeleted

func AskToRemoveDeleted(deletedRepos []location.LocalRepo) []location.LocalRepo

Confirm with the user that they want to remove a deleted repo

func AskToRemoveOutdated

func AskToRemoveOutdated(outdatedRepos []OutdatedRepo) []location.LocalRepo

Confirm with the user that they want to remove an outdated repo

func CleanUp

func CleanUp() (removed []string)

Remove empty folders >3 diretories deep from ~/github

func GetDeleted

func GetDeleted(repos []location.LocalRepo) (deleted []location.LocalRepo)

Get all the repos locally that have been deleted on GitHub

func Remove

func Remove(repos []location.LocalRepo)

Remove the repos

Types

type Flags

type Flags struct {
	Years  int
	Months int
	Days   int
}

func ParseFlags

func ParseFlags(cmd *cobra.Command) Flags

Parse arguments

type OutdatedRepo

type OutdatedRepo struct {
	Repo    location.LocalRepo
	ModTime time.Time
}

func GetOutdated

func GetOutdated(repos []location.LocalRepo, yearsOld int, monthsOld int, daysOld int) (outdated []OutdatedRepo)

Get the repos that haven't been modified locally in a certain amount of time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL