aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/util.go
diff options
context:
space:
mode:
authorMichael Hudson-Doyle <michael.hudson@canonical.com>2015-09-07 15:00:52 +1200
committerMichael Hudson-Doyle <michael.hudson@canonical.com>2015-09-08 21:04:43 +0000
commit69a143e3888982a64427375b3f4bdbd2fee07198 (patch)
tree6dd889b98e0fa22e04fa9bd3b38f4111ef88eddb /src/cmd/internal/obj/util.go
parent74a123fcfa94a743d16b22fdc74da3116419a5e5 (diff)
downloadgo-69a143e3888982a64427375b3f4bdbd2fee07198.tar.xz
cmd/internal/obj: remove dead code and small cleanups
Change-Id: I88fa0cc245a2141af04acced8716e08b1133abd1 Reviewed-on: https://go-review.googlesource.com/14350 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/util.go')
-rw-r--r--src/cmd/internal/obj/util.go27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
index 3c3fc88674..f03eb6943f 100644
--- a/src/cmd/internal/obj/util.go
+++ b/src/cmd/internal/obj/util.go
@@ -11,7 +11,6 @@ import (
"io"
"log"
"os"
- "strconv"
"strings"
"time"
)
@@ -166,17 +165,6 @@ func Brdstr(b *Biobuf, delim int, cut int) string {
return s
}
-func Access(name string, mode int) int {
- if mode != 0 {
- panic("bad access")
- }
- _, err := os.Stat(name)
- if err != nil {
- return -1
- }
- return 0
-}
-
func Blinelen(b *Biobuf) int {
return b.linelen
}
@@ -212,10 +200,14 @@ func Getgoos() string {
return envOr("GOOS", defaultGOOS)
}
-func Getgoarm() string {
+func Getgoarm() int32 {
switch v := envOr("GOARM", defaultGOARM); v {
- case "5", "6", "7":
- return v
+ case "5":
+ return 5
+ case "6":
+ return 6
+ case "7":
+ return 7
}
// Fail here, rather than validate at multiple call sites.
log.Fatalf("Invalid GOARM value. Must be 5, 6, or 7.")
@@ -235,11 +227,6 @@ func Getgoversion() string {
return version
}
-func Atoi(s string) int {
- i, _ := strconv.Atoi(s)
- return i
-}
-
func (p *Prog) Line() string {
return p.Ctxt.LineHist.LineString(int(p.Lineno))
}