mirror of
				https://github.com/go-delve/delve.git
				synced 2025-11-04 06:32:16 +08:00 
			
		
		
		
	Reduce nesting
This commit is contained in:
		@ -147,13 +147,15 @@ func (dbp *DebuggedProcess) EvalSymbol(name string) (*Variable, error) {
 | 
				
			|||||||
			return nil, err
 | 
								return nil, err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if entry.Tag == dwarf.TagVariable {
 | 
							if entry.Tag != dwarf.TagVariable {
 | 
				
			||||||
			n, ok := entry.Val(dwarf.AttrName).(string)
 | 
								continue
 | 
				
			||||||
			if !ok {
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							n, ok := entry.Val(dwarf.AttrName).(string)
 | 
				
			||||||
 | 
							if !ok || n != name {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if n == name {
 | 
					 | 
				
			||||||
		offset, ok := entry.Val(dwarf.AttrType).(dwarf.Offset)
 | 
							offset, ok := entry.Val(dwarf.AttrType).(dwarf.Offset)
 | 
				
			||||||
		if !ok {
 | 
							if !ok {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
@ -176,8 +178,6 @@ func (dbp *DebuggedProcess) EvalSymbol(name string) (*Variable, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		return &Variable{Name: n, Type: t.String(), Value: val}, nil
 | 
							return &Variable{Name: n, Type: t.String(), Value: val}, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return nil, fmt.Errorf("could not find symbol value for %s", name)
 | 
						return nil, fmt.Errorf("could not find symbol value for %s", name)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user