aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2025-07-26 16:46:22 +0800
committerAlan Donovan <adonovan@google.com>2025-08-05 10:31:25 -0700
commit4ee0df8c466861bcd258ec55b58283f276d3b3d5 (patch)
tree9f8b467a6eff9720f5033477d21777e373848d2e /src/cmd/dist
parenta2c45f0eb1f281ed39c5111dd0fe4b2728f11cf3 (diff)
downloadgo-4ee0df8c466861bcd258ec55b58283f276d3b3d5.tar.xz
cmd: remove dead code
Fixes #74076 Change-Id: Icc67b3d4e342f329584433bd1250c56ae8f5a73d Reviewed-on: https://go-review.googlesource.com/c/go/+/690635 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/imports.go12
-rw-r--r--src/cmd/dist/util.go10
2 files changed, 0 insertions, 22 deletions
diff --git a/src/cmd/dist/imports.go b/src/cmd/dist/imports.go
index 05dd84d0f1..0ec2b06c4f 100644
--- a/src/cmd/dist/imports.go
+++ b/src/cmd/dist/imports.go
@@ -205,18 +205,6 @@ func (r *importReader) readImport(imports *[]string) {
r.readString(imports)
}
-// readComments is like ioutil.ReadAll, except that it only reads the leading
-// block of comments in the file.
-func readComments(f io.Reader) ([]byte, error) {
- r := &importReader{b: bufio.NewReader(f)}
- r.peekByte(true)
- if r.err == nil && !r.eof {
- // Didn't reach EOF, so must have found a non-space byte. Remove it.
- r.buf = r.buf[:len(r.buf)-1]
- }
- return r.buf, r.err
-}
-
// readimports returns the imports found in the named file.
func readimports(file string) []string {
var imports []string
diff --git a/src/cmd/dist/util.go b/src/cmd/dist/util.go
index 4d5e3589dc..7db06f86ea 100644
--- a/src/cmd/dist/util.go
+++ b/src/cmd/dist/util.go
@@ -362,16 +362,6 @@ func errprintf(format string, args ...interface{}) {
fmt.Fprintf(os.Stderr, format, args...)
}
-// xsamefile reports whether f1 and f2 are the same file (or dir).
-func xsamefile(f1, f2 string) bool {
- fi1, err1 := os.Stat(f1)
- fi2, err2 := os.Stat(f2)
- if err1 != nil || err2 != nil {
- return f1 == f2
- }
- return os.SameFile(fi1, fi2)
-}
-
func xgetgoarm() string {
// If we're building on an actual arm system, and not building
// a cross-compiling toolchain, try to exec ourselves