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
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
src/cmd/gotest/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{}) {
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.
// If the item is already in the environment, addEnv replaces the value.
func
addEnv
(
name
,
value
string
)
{
...
...
@@ -143,9 +136,10 @@ func setEnvironment() {
GOARCH
=
runtime
.
GOARCH
}
addEnv
(
"GOARCH"
,
GOARCH
)
O
=
theChar
[
GOARCH
]
if
O
==
""
{
Fatalf
(
"unknown architecture %s"
,
GOARCH
)
var
err
error
O
,
err
=
build
.
ArchChar
(
GOARCH
)
if
err
!=
nil
{
Fatalf
(
"unknown architecture: %s"
,
err
)
}
// 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