redefinition of the built-in function len
402 var result string
403 buf := make([]byte, 1024)
404 for {
405 len, err := response.Body.Read(buf);406 if len > 0 {
407 result += strings.TrimSpace(string(buf[:len]))
408 }
Description
Constant names like false
, true
, nil
and function names like append
,
make
, and basic type names like bool
, and byte
are not reserved keywords
of the language making them eligible for redefinition. It is not recommended to
redefine these builtins (or keywords) that can lead to bugs that are very
difficult to detect.
Bad practice
nil := true
Recommended
nilVal := true