cleanup

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "cleanup",
	Short: "Clean up all not used resources (only volumes yet)",
	Long: `Clean up all not used resources

	Currently, all resources means:

	- Volumes
	`,
	Args: cobra.NoArgs,
	Run: func(c *cobra.Command, args []string) {
		token := digitalocean_utils.GetToken()

		v := digitalocean_utils.PrepareVolumesCleanUp(token)

		fmt.Println("")
		fmt.Println("Wait 10s, cancel clean up using ctrl-c")

		for i := 1; i <= 10; i++ {
			fmt.Print(".")
			time.Sleep(time.Second)
		}

		fmt.Println("")
		fmt.Println("Cleaning up...")

		digitalocean_utils.DoVolumesCleanUp(token, v)

		fmt.Println("Done.")
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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