aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objfile
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2018-04-12 12:16:06 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2018-04-12 22:17:57 +0000
commit7da88b83d59216c5dcd90c796bcda8c301643836 (patch)
tree5776ce11a5a3c41cbfbde359b82bf6f68839c12d /src/cmd/internal/objfile
parent507e377e181f893b633534d7a7cdf385dc274c80 (diff)
downloadgo-7da88b83d59216c5dcd90c796bcda8c301643836.tar.xz
cmd/internal/objfile: clean up some comments
Change-Id: Iba6feea74d65a961f30c12fb6c677ccd3b2c3591 Reviewed-on: https://go-review.googlesource.com/106695 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/internal/objfile')
-rw-r--r--src/cmd/internal/objfile/disasm.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/internal/objfile/disasm.go b/src/cmd/internal/objfile/disasm.go
index ef8ef4324b..40f87e4869 100644
--- a/src/cmd/internal/objfile/disasm.go
+++ b/src/cmd/internal/objfile/disasm.go
@@ -130,9 +130,9 @@ func NewFileCache(maxLen int) *FileCache {
}
// Line returns the source code line for the given file and line number.
-// If the file is not already cached, reads it , inserts it into the cache,
+// If the file is not already cached, reads it, inserts it into the cache,
// and removes the least recently used file if necessary.
-// If the file is in cache, moves it up to the front of the list.
+// If the file is in cache, it is moved to the front of the list.
func (fc *FileCache) Line(filename string, line int) ([]byte, error) {
if filepath.Ext(filename) != ".go" {
return nil, nil
@@ -143,7 +143,7 @@ func (fc *FileCache) Line(filename string, line int) ([]byte, error) {
// the leading src.FileSymPrefix.
filename = strings.TrimPrefix(filename, src.FileSymPrefix)
- // Expand literal "$GOROOT" rewrited by obj.AbsFile()
+ // Expand literal "$GOROOT" rewritten by obj.AbsFile()
filename = filepath.Clean(os.ExpandEnv(filename))
var cf *CachedFile