]> Cypherpunks repositories - gostls13.git/commitdiff
goinstall: s/vlogf/printf/
authorAndrew Gerrand <adg@golang.org>
Mon, 20 Jun 2011 04:44:14 +0000 (14:44 +1000)
committerAndrew Gerrand <adg@golang.org>
Mon, 20 Jun 2011 04:44:14 +0000 (14:44 +1000)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4628050

src/cmd/goinstall/download.go
src/cmd/goinstall/main.go

index 6647d39e2511676b910f97dae8feaa89853fc0cb..12b1524ce064cc996952774cdd8a46b26b822a65 100644 (file)
@@ -173,7 +173,7 @@ func tryCommand(c chan *vcsMatch, v *vcs, prefixes []string) {
                for _, prefix := range prefixes {
                        for _, suffix := range suffixes {
                                repo := proto + "://" + prefix + suffix
-                               vlogf("try: %s %s %s\n", v.cmd, v.check, repo)
+                               printf("try: %s %s %s\n", v.cmd, v.check, repo)
                                if exec.Command(v.cmd, v.check, repo).Run() == nil {
                                        c <- &vcsMatch{v, prefix, repo}
                                        return
index 87135fd0cff02c08252535696636cb8e8898d742..aad3ca863537579b6a2bd9f2e3c73682cc14fc34 100644 (file)
@@ -57,7 +57,7 @@ func logf(format string, args ...interface{}) {
        fmt.Fprintf(os.Stderr, format, args...)
 }
 
-func vlogf(format string, args ...interface{}) {
+func printf(format string, args ...interface{}) {
        if *verbose {
                logf(format, args...)
        }
@@ -175,14 +175,14 @@ func install(pkg, parent string) (built bool) {
                if parent == "" {
                        errorf("%s: can not goinstall the standard library\n", pkg)
                } else {
-                       vlogf("%s: skipping standard library\n", pkg)
+                       printf("%s: skipping standard library\n", pkg)
                }
                return
        }
        // Download remote packages if not found or forced with -u flag.
        remote := isRemote(pkg)
        if remote && (err == build.ErrNotFound || (err == nil && *update)) {
-               vlogf("%s: download\n", pkg)
+               printf("%s: download\n", pkg)
                err = download(pkg, tree.SrcDir())
        }
        if err != nil {
@@ -220,22 +220,22 @@ func install(pkg, parent string) (built bool) {
                return
        }
        if *nuke {
-               vlogf("%s: nuke\n", pkg)
+               printf("%s: nuke\n", pkg)
                script.Nuke()
        } else if *clean {
-               vlogf("%s: clean\n", pkg)
+               printf("%s: clean\n", pkg)
                script.Clean()
        }
        if *doInstall {
                if depBuilt || script.Stale() {
-                       vlogf("%s: install\n", pkg)
+                       printf("%s: install\n", pkg)
                        if err := script.Run(); err != nil {
                                errorf("%s: install: %v\n", pkg, err)
                                return
                        }
                        built = true
                } else {
-                       vlogf("%s: up-to-date\n", pkg)
+                       printf("%s: up-to-date\n", pkg)
                }
        }
        if remote {
@@ -272,7 +272,7 @@ func genRun(dir string, stdin []byte, arg []string, quiet bool) os.Error {
        cmd := exec.Command(arg[0], arg[1:]...)
        cmd.Stdin = bytes.NewBuffer(stdin)
        cmd.Dir = dir
-       vlogf("%s: %s %s\n", dir, cmd.Path, strings.Join(arg[1:], " "))
+       printf("%s: %s %s\n", dir, cmd.Path, strings.Join(arg[1:], " "))
        out, err := cmd.CombinedOutput()
        if err != nil {
                if !quiet || *verbose {