code: func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) {
  	switch {
  	// we've already converted the type, or it's a map
  	case t.Kind == types.Protobuf || t.Kind == types.Map:
  		p.tracker.AddType(t)
  		return t, nil
  	}
  	// it's a fundamental type
  	if t, ok := isFundamentalProtoType(t); ok {
  		p.tracker.AddType(t)
  		return t, nil
  	}
  	// it's a message
  	if t.Kind == types.Struct || isOptionalAlias(t) {
  		t := &types.Type{
  			Name: p.namer.GoNameToProtoName(t.Name),
  			Kind: types.Protobuf,
  
  			CommentLines: t.CommentLines,
  		}
  		p.tracker.AddType(t)
  		return t, nil
  	}
  	return nil, errUnrecognizedType
  }
docs: // ProtoTypeFor locates a Protobuf type for the provided Go type (if possible).