package main import ( "go.wit.com/gui" "go.wit.com/log" ) func globalResetOptions(box *gui.Node) { group2 := box.NewGroup("Global Destructive Options") buildOptions := group2.NewGrid("buildOptions", 2, 1) buildOptions.NewLabel("start over") buildOptions.NewButton("rm ~/go/src & ~/go/pkg", func() { for repo, _ := range me.allrepos { // status := repo.getStatus() if repo.status.CheckDirty() { log.Warn("repo is dirty. commit your changes first", repo.String()) return } else { log.Warn("repo is not dirty", repo.String()) log.Warn("TODO: check things are pushed and check every dir in go/src/") } } /* newCmds = append(newCmds, []string{"cd", "/home/jcarr/"}) newCmds = append(newCmds, []string{"rm", "-rf", "go/src/"}) newCmds = append(newCmds, []string{"chmod", "700", "-R", "go/pkg/"}) newCmds = append(newCmds, []string{"rm", "-rf", "go/pkg/"}) if dirty { newCmds = append(newCmds, []string{"can't do this with dirty repos"}) } else { } */ }) buildOptions.NewSeparator("endStatusScans") buildOptions.NewSeparator("endStatusScans") }