func Archive(cmd *cli.Cmd) { uuid := cmd.String(cli.StringArg{ Name: "UUID", Desc: "Region UUID", HideValue: true, }) cmd.Action = func() { var l *pools.Location l, resp, errs := l.Delete(*uuid) if len(errs) > 0 { log.Fatalf("Could not archive location: %s", errs) } if resp.StatusCode != 202 { log.Fatalf("Could not archive location: %s", resp.Status) } fmt.Sprintf("Location %s accepted for archival\n", *uuid) } }