Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Commit 21ed24b

Browse files
committed
Merge pull request #579 from constabulary/unused
all: remove unused code
2 parents 0ed0bbc + e66ab8c commit 21ed24b

File tree

9 files changed

+2
-27
lines changed

9 files changed

+2
-27
lines changed

cmd/gb-vendor/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
var (
1515
fs = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
1616
projectroot = os.Getenv("GB_PROJECT_DIR")
17-
args []string
1817
)
1918

2019
func init() {

cmd/gb/depset.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ func depset(ctx *gb.Context, args []string) error {
6161
return nil
6262
}
6363

64-
func keys(m map[string]bool) []string {
65-
var s []string
66-
for k := range m {
67-
s = append(s, k)
68-
}
69-
return s
70-
}
71-
7264
func pkgs(m map[string]*vendor.Pkg) []*vendor.Pkg {
7365
var p []*vendor.Pkg
7466
for _, v := range m {

cmd/gb/gb_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ import (
2626
var (
2727
canRun = true // whether we can run go or ./testgb
2828
canRace = false // whether we can run the race detector
29-
canCgo = false // whether we can use cgo
3029

3130
exeSuffix string // ".exe" on Windows
3231

33-
skipExternalBuilder = false // skip external tests on this builder
34-
3532
testgb string = "testgb"
3633
)
3734

cmd/gb/list.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
)
1717

1818
var (
19-
projectroot string
2019
format string
2120
formatStdin bool
2221
jsonOutput bool

cmd/gb/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ import (
1414
)
1515

1616
var (
17-
fs = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
18-
cwd string
19-
args []string
17+
fs = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
18+
cwd string
2019
)
2120

2221
const (

cmd/gb/signal_unix.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,3 @@ import (
1212
)
1313

1414
var signalsToIgnore = []os.Signal{os.Interrupt, syscall.SIGQUIT}
15-
16-
// signalTrace is the signal to send to make a Go program
17-
// crash with a stack trace.
18-
var signalTrace os.Signal = syscall.SIGQUIT

cmd/gb/test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func init() {
1818

1919
var (
2020
tfs []string // Arguments passed to the test binary
21-
testProfile bool
2221
testCover bool
2322
testCoverMode string
2423
testCoverPkg string

fileutils/path_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
"testing"
1010
)
1111

12-
var isReadonlyError = func(error) bool { return false }
13-
1412
func TestRemoveAll(t *testing.T) {
1513
tmpDir := os.TempDir()
1614
// Work directory.

vendor/repo.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,6 @@ func cleanPath(path string) error {
486486
return cleanPath(parent)
487487
}
488488

489-
func mkdir(path string) error {
490-
return os.MkdirAll(path, 0755)
491-
}
492-
493489
func mktmp() (string, error) {
494490
return ioutil.TempDir("", "gb-vendor-")
495491
}

0 commit comments

Comments
 (0)