diff options
Diffstat (limited to 'src/runtime/debug')
| -rw-r--r-- | src/runtime/debug/mod.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/debug/mod.go b/src/runtime/debug/mod.go index 8a1b1666bd..53bbf1d847 100644 --- a/src/runtime/debug/mod.go +++ b/src/runtime/debug/mod.go @@ -161,7 +161,7 @@ func ParseBuildInfo(data string) (bi *BuildInfo, err error) { } }() - var ( + const ( pathLine = "path\t" modLine = "mod\t" depLine = "dep\t" @@ -202,7 +202,7 @@ func ParseBuildInfo(data string) (bi *BuildInfo, err error) { switch { case strings.HasPrefix(line, pathLine): elem := line[len(pathLine):] - bi.Path = string(elem) + bi.Path = elem case strings.HasPrefix(line, modLine): elem := strings.Split(line[len(modLine):], tab) last = &bi.Main @@ -227,9 +227,9 @@ func ParseBuildInfo(data string) (bi *BuildInfo, err error) { return nil, fmt.Errorf("replacement with no module on previous line") } last.Replace = &Module{ - Path: string(elem[0]), - Version: string(elem[1]), - Sum: string(elem[2]), + Path: elem[0], + Version: elem[1], + Sum: elem[2], } last = nil case strings.HasPrefix(line, buildLine): |
