clean

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskToRemoveDeleted

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

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

func AskToRemoveOutdated

func AskToRemoveOutdated(outdatedRepos []OutdatedRepo) []repos.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 []repos.LocalRepo) (deleted []repos.LocalRepo)

Get all the repos locally that have been deleted on GitHub

func Remove

func Remove(repos []repos.LocalRepo)

Remove the repos

Types

type Flags

type Flags struct {
	Years        int
	Months       int
	Days         int
	SkipOutdated bool
	SkipDeleted  bool
}

func ParseFlags

func ParseFlags(cmd *cobra.Command) Flags

Parse arguments

type OutdatedRepo

type OutdatedRepo struct {
	Repo        repos.LocalRepo
	ModTime     time.Time
	Uncommitted bool
	NotPushed   bool
}

func GetOutdated

func GetOutdated(clonedRepos []repos.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