diff --git a/cmd/godoc/appinit.go b/cmd/godoc/appinit.go index 0c83df9074..66700dcf1b 100644 --- a/cmd/godoc/appinit.go +++ b/cmd/godoc/appinit.go @@ -24,7 +24,6 @@ import ( "golang.org/x/tools/godoc/vfs" "golang.org/x/tools/godoc/vfs/mapfs" "golang.org/x/tools/godoc/vfs/zipfs" - "google.golang.org/appengine" ) diff --git a/cmd/godoc/godoc19_test.go b/cmd/godoc/godoc19_test.go deleted file mode 100644 index 655a623d67..0000000000 --- a/cmd/godoc/godoc19_test.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package main_test - -func init() { isGo19 = true } diff --git a/cmd/godoc/godoc_test.go b/cmd/godoc/godoc_test.go index b967e28373..ab12353d75 100644 --- a/cmd/godoc/godoc_test.go +++ b/cmd/godoc/godoc_test.go @@ -54,21 +54,11 @@ func buildGodoc(t *testing.T) (bin string, cleanup func()) { return bin, func() { os.RemoveAll(tmp) } } -var isGo19 bool // godoc19_test.go sets it to true. - // Basic regression test for godoc command-line tool. func TestCLI(t *testing.T) { bin, cleanup := buildGodoc(t) defer cleanup() - // condStr returns s if cond is true, otherwise empty string. - condStr := func(cond bool, s string) string { - if !cond { - return "" - } - return s - } - tests := []struct { args []string matches []string // regular expressions @@ -91,13 +81,7 @@ func TestCLI(t *testing.T) { { args: []string{"nonexistingpkg"}, matches: []string{ - `cannot find package` + - // TODO: Remove this when support for Go 1.8 is dropped. - condStr(!isGo19, - // For Go 1.8 and older, because it doesn't have CL 33158 change applied to go/build. - // The last pattern (does not e) is for plan9: - // http://build.golang.org/log/2d8e5e14ed365bfa434b37ec0338cd9e6f8dd9bf - `|no such file or directory|does not exist|cannot find the file|(?:' does not e)`), + `cannot find package`, }, }, {