mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 04:35:19 +08:00
pkg/proc,service/test: refactor to strings.ReplaceAll (#3269)
Use strings.ReplaceAll instead of strings.Replace with -1 as the last argument.
This commit is contained in:
@ -293,7 +293,7 @@ func (varCheck *varCheck) checkInScope(line int, scope *proc.EvalScope, t *testi
|
||||
|
||||
func (varCheck *varCheck) check(line int, v *proc.Variable, t *testing.T, ctxt string) {
|
||||
typ := v.DwarfType.String()
|
||||
typ = strings.Replace(typ, " ", "", -1)
|
||||
typ = strings.ReplaceAll(typ, " ", "")
|
||||
if typ != varCheck.typ {
|
||||
t.Errorf("%d: wrong type for %s (%s), got %s, expected %s", line, v.Name, ctxt, typ, varCheck.typ)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user