mirror of
https://github.com/golang/go
synced 2024-11-26 19:51:17 -07:00
cmd: remove redundant _
Signed-off-by: cui fliter <imcusg@gmail.com> cmd: remove redundant _ Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
2cbcf36ede
commit
a62b72ea3e
@ -107,7 +107,7 @@ func Info(fnsym *obj.LSym, infosym *obj.LSym, curfn interface{}) ([]dwarf.Scope,
|
||||
// the function symbol to insure that the type included in DWARF
|
||||
// processing during linking.
|
||||
typesyms := []*obj.LSym{}
|
||||
for t, _ := range fnsym.Func().Autot {
|
||||
for t := range fnsym.Func().Autot {
|
||||
typesyms = append(typesyms, t)
|
||||
}
|
||||
sort.Sort(obj.BySymName(typesyms))
|
||||
|
@ -1104,7 +1104,7 @@ func loadFromRoots(ctx context.Context, params loaderParams) *loader {
|
||||
}
|
||||
|
||||
toAdd := make([]module.Version, 0, len(modAddedBy))
|
||||
for m, _ := range modAddedBy {
|
||||
for m := range modAddedBy {
|
||||
toAdd = append(toAdd, m)
|
||||
}
|
||||
module.Sort(toAdd) // to make errors deterministic
|
||||
|
@ -1128,7 +1128,7 @@ func (rr *replacementRepo) Versions(prefix string) (*modfetch.Versions, error) {
|
||||
for _, mm := range MainModules.Versions() {
|
||||
if index := MainModules.Index(mm); index != nil && len(index.replace) > 0 {
|
||||
path := rr.ModulePath()
|
||||
for m, _ := range index.replace {
|
||||
for m := range index.replace {
|
||||
if m.Path == path && strings.HasPrefix(m.Version, prefix) && m.Version != "" && !module.IsPseudoVersion(m.Version) {
|
||||
versions = append(versions, m.Version)
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ func runUse(ctx context.Context, cmd *base.Command, args []string) {
|
||||
|
||||
// Remove entries for subdirectories that no longer exist.
|
||||
// Because they don't exist, they will be skipped by Walk.
|
||||
for absDir, _ := range haveDirs {
|
||||
for absDir := range haveDirs {
|
||||
if str.HasFilePathPrefix(absDir, absArg) {
|
||||
if _, ok := keepDirs[absDir]; !ok {
|
||||
keepDirs[absDir] = "" // Mark for deletion.
|
||||
|
@ -547,7 +547,7 @@ func TestAddrClassifier(t *testing.T) {
|
||||
case int:
|
||||
expect = []int{tst.output.(int), tst.output.(int), tst.output.(int), tst.output.(int)}
|
||||
}
|
||||
for i, _ := range ctxts {
|
||||
for i := range ctxts {
|
||||
if output := ctxts[i].aclass(&tst.arg); output != expect[i] {
|
||||
t.Errorf("%s.aclass(%v) = %v, expected %v\n", name[i], tst.arg, DRconv(output), DRconv(expect[i]))
|
||||
}
|
||||
|
@ -2730,7 +2730,7 @@ func (ctxt *Link) address() []*sym.Segment {
|
||||
if gotAddr := ldr.SymValue(ctxt.GOT); gotAddr != 0 {
|
||||
tocAddr = gotAddr + 0x8000
|
||||
}
|
||||
for i, _ := range ctxt.DotTOC {
|
||||
for i := range ctxt.DotTOC {
|
||||
if i >= sym.SymVerABICount && i < sym.SymVerStatic { // these versions are not used currently
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user