INNER CODE UNIT · Go
func
rebuy-de/aws-nuke · cmd/nuke.go:33
func (n *Nuke) Run() error {
var err error
if n.Parameters.ForceSleep < 3 && n.Parameters.NoDryRun {
return fmt.Errorf("Value for --force-sleep cannot be less than 3 seconds if --no-dry-run is set. This is for your own protection.")
}
forceSleep := time.Duration(n.Parameters.ForceSleep) * time.Second
fmt.Printf("aws-nuke version %s - %s - %s\n\n", BuildVersion, BuildDate, BuildHash)
err = n.Config.ValidateAccount(n.Account.ID(), n.Account.Aliases())
if err != nil {
return err
}
fmt.Printf("Do you really want to nuke the account with "+
"the ID %s and the alias '%s'?\n", n.Account.ID(), n.Account.Alias())
if n.Parameters.Force {