Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
d8d32106
Commit
d8d32106
authored
Dec 10, 2011
by
Robert Hencke
Committed by
Rob Pike
Dec 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gotest: use build.ArchChar()
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5480060
parent
fdb09d28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
gotest.go
src/cmd/gotest/gotest.go
+4
-10
No files found.
src/cmd/gotest/gotest.go
View file @
d8d32106
...
@@ -114,13 +114,6 @@ func Fatalf(s string, args ...interface{}) {
...
@@ -114,13 +114,6 @@ func Fatalf(s string, args ...interface{}) {
os
.
Exit
(
2
)
os
.
Exit
(
2
)
}
}
// theChar is the map from architecture to object character.
var
theChar
=
map
[
string
]
string
{
"arm"
:
"5"
,
"amd64"
:
"6"
,
"386"
:
"8"
,
}
// addEnv adds a name=value pair to the environment passed to subcommands.
// addEnv adds a name=value pair to the environment passed to subcommands.
// If the item is already in the environment, addEnv replaces the value.
// If the item is already in the environment, addEnv replaces the value.
func
addEnv
(
name
,
value
string
)
{
func
addEnv
(
name
,
value
string
)
{
...
@@ -143,9 +136,10 @@ func setEnvironment() {
...
@@ -143,9 +136,10 @@ func setEnvironment() {
GOARCH
=
runtime
.
GOARCH
GOARCH
=
runtime
.
GOARCH
}
}
addEnv
(
"GOARCH"
,
GOARCH
)
addEnv
(
"GOARCH"
,
GOARCH
)
O
=
theChar
[
GOARCH
]
var
err
error
if
O
==
""
{
O
,
err
=
build
.
ArchChar
(
GOARCH
)
Fatalf
(
"unknown architecture %s"
,
GOARCH
)
if
err
!=
nil
{
Fatalf
(
"unknown architecture: %s"
,
err
)
}
}
// Commands and their flags.
// Commands and their flags.
...
...
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