fix ineffectual assignment to name (ineffassign)

This commit is contained in:
Antonio Ojea 2021-11-16 18:10:38 +01:00
parent 31d45d000b
commit 52c69ba744

View File

@ -573,7 +573,7 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types.
switch parts[0] {
case "varint", "fixed32", "fixed64", "bytes", "group":
default:
name := types.Name{}
var name types.Name
if last := strings.LastIndex(parts[0], "."); last != -1 {
prefix := parts[0][:last]
name = types.Name{