diff --git a/build/build.go b/build/build.go index 2c835ccf0..e82e8052e 100644 --- a/build/build.go +++ b/build/build.go @@ -90,19 +90,6 @@ func Import(path string, mode build.ImportMode, installSuffix string, buildTags return xctx.Import(path, wd, mode) } -// excludeExecutable excludes all executable implementation .go files. -// They have "executable_" prefix. -func excludeExecutable(goFiles []string) []string { - var s []string - for _, f := range goFiles { - if strings.HasPrefix(f, "executable_") { - continue - } - s = append(s, f) - } - return s -} - // exclude returns files, excluding specified files. func exclude(files []string, exclude ...string) []string { var s []string @@ -118,12 +105,6 @@ Outer: return s } -func include(files []string, includes ...string) []string { - files = exclude(files, includes...) // Ensure there won't be duplicates. - files = append(files, includes...) - return files -} - // ImportDir is like Import but processes the Go package found in the named // directory. func ImportDir(dir string, mode build.ImportMode, installSuffix string, buildTags []string) (*PackageData, error) { diff --git a/build/fsutil.go b/build/fsutil.go index cee763f14..4864833d4 100644 --- a/build/fsutil.go +++ b/build/fsutil.go @@ -2,7 +2,6 @@ package build import ( "fmt" - "os" "path/filepath" ) @@ -13,16 +12,3 @@ func mustAbs(p string) string { } return a } - -// makeWritable attempts to make the given path writable by its owner. -func makeWritable(path string) error { - info, err := os.Stat(path) - if err != nil { - return err - } - err = os.Chmod(path, info.Mode()|0700) - if err != nil { - return err - } - return nil -}