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
19187398
Commit
19187398
authored
Jan 23, 2012
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/build: silence all warnings
R=rsc CC=golang-dev
https://golang.org/cl/5529055
parent
6e1c0df1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
21 deletions
+1
-21
src/pkg/go/build/path.go
src/pkg/go/build/path.go
+1
-21
No files found.
src/pkg/go/build/path.go
View file @
19187398
...
@@ -7,7 +7,6 @@ package build
...
@@ -7,7 +7,6 @@ package build
import
(
import
(
"errors"
"errors"
"fmt"
"fmt"
"log"
"os"
"os"
"path/filepath"
"path/filepath"
"runtime"
"runtime"
...
@@ -81,7 +80,6 @@ func (t *Tree) HasPkg(pkg string) bool {
...
@@ -81,7 +80,6 @@ func (t *Tree) HasPkg(pkg string) bool {
return
false
return
false
}
}
return
!
fi
.
IsDir
()
return
!
fi
.
IsDir
()
// TODO(adg): check object version is consistent
}
}
var
(
var
(
...
@@ -150,38 +148,20 @@ var (
...
@@ -150,38 +148,20 @@ var (
func
init
()
{
func
init
()
{
root
:=
runtime
.
GOROOT
()
root
:=
runtime
.
GOROOT
()
t
,
err
:=
newTree
(
root
)
t
,
err
:=
newTree
(
root
)
if
err
!=
nil
{
if
err
==
nil
{
log
.
Printf
(
"invalid GOROOT %q: %v"
,
root
,
err
)
}
else
{
t
.
Goroot
=
true
t
.
Goroot
=
true
Path
=
[]
*
Tree
{
t
}
Path
=
[]
*
Tree
{
t
}
}
}
Loop
:
for
_
,
p
:=
range
filepath
.
SplitList
(
os
.
Getenv
(
"GOPATH"
))
{
for
_
,
p
:=
range
filepath
.
SplitList
(
os
.
Getenv
(
"GOPATH"
))
{
if
p
==
""
{
if
p
==
""
{
continue
continue
}
}
t
,
err
:=
newTree
(
p
)
t
,
err
:=
newTree
(
p
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"invalid GOPATH %q: %v"
,
p
,
err
)
continue
continue
}
}
// Check for dupes.
// TODO(alexbrainman): make this correct under windows (case insensitive).
for
_
,
t2
:=
range
Path
{
if
t2
.
Path
!=
t
.
Path
{
continue
}
if
t2
.
Goroot
{
log
.
Printf
(
"GOPATH is the same as GOROOT: %q"
,
t
.
Path
)
}
else
{
log
.
Printf
(
"duplicate GOPATH entry: %q"
,
t
.
Path
)
}
continue
Loop
}
Path
=
append
(
Path
,
t
)
Path
=
append
(
Path
,
t
)
gcImportArgs
=
append
(
gcImportArgs
,
"-I"
,
t
.
PkgDir
())
gcImportArgs
=
append
(
gcImportArgs
,
"-I"
,
t
.
PkgDir
())
ldImportArgs
=
append
(
ldImportArgs
,
"-L"
,
t
.
PkgDir
())
ldImportArgs
=
append
(
ldImportArgs
,
"-L"
,
t
.
PkgDir
())
...
...
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