Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
f3a7dad6
Commit
f3a7dad6
authored
Jun 20, 2011
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goinstall: s/vlogf/printf/
R=golang-dev, dsymonds CC=golang-dev
https://golang.org/cl/4628050
parent
e068b85b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/cmd/goinstall/download.go
src/cmd/goinstall/download.go
+1
-1
src/cmd/goinstall/main.go
src/cmd/goinstall/main.go
+8
-8
No files found.
src/cmd/goinstall/download.go
View file @
f3a7dad6
...
...
@@ -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
vlog
f
(
"try: %s %s %s
\n
"
,
v
.
cmd
,
v
.
check
,
repo
)
print
f
(
"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
...
...
src/cmd/goinstall/main.go
View file @
f3a7dad6
...
...
@@ -57,7 +57,7 @@ func logf(format string, args ...interface{}) {
fmt
.
Fprintf
(
os
.
Stderr
,
format
,
args
...
)
}
func
vlog
f
(
format
string
,
args
...
interface
{})
{
func
print
f
(
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
{
vlog
f
(
"%s: skipping standard library
\n
"
,
pkg
)
print
f
(
"%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
))
{
vlog
f
(
"%s: download
\n
"
,
pkg
)
print
f
(
"%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
{
vlog
f
(
"%s: nuke
\n
"
,
pkg
)
print
f
(
"%s: nuke
\n
"
,
pkg
)
script
.
Nuke
()
}
else
if
*
clean
{
vlog
f
(
"%s: clean
\n
"
,
pkg
)
print
f
(
"%s: clean
\n
"
,
pkg
)
script
.
Clean
()
}
if
*
doInstall
{
if
depBuilt
||
script
.
Stale
()
{
vlog
f
(
"%s: install
\n
"
,
pkg
)
print
f
(
"%s: install
\n
"
,
pkg
)
if
err
:=
script
.
Run
();
err
!=
nil
{
errorf
(
"%s: install: %v
\n
"
,
pkg
,
err
)
return
}
built
=
true
}
else
{
vlog
f
(
"%s: up-to-date
\n
"
,
pkg
)
print
f
(
"%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
vlog
f
(
"%s: %s %s
\n
"
,
dir
,
cmd
.
Path
,
strings
.
Join
(
arg
[
1
:
],
" "
))
print
f
(
"%s: %s %s
\n
"
,
dir
,
cmd
.
Path
,
strings
.
Join
(
arg
[
1
:
],
" "
))
out
,
err
:=
cmd
.
CombinedOutput
()
if
err
!=
nil
{
if
!
quiet
||
*
verbose
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment