package misc import ( "os" "os/exec" ) func GoModTidy() error { cmd := exec.Command("go", "mod", "tidy") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr cmd.Stdin = os.Stdin return cmd.Run() }