internal/lsp: reply with nil, rather than empty, signature help

Change-Id: I9326ad59fb3ee33aba2ba9d05758dae5c3451bde
Reviewed-on: https://go-review.googlesource.com/c/tools/+/181358
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
diff --git a/internal/lsp/signature_help.go b/internal/lsp/signature_help.go
index 7a31d81..85d7eea 100644
--- a/internal/lsp/signature_help.go
+++ b/internal/lsp/signature_help.go
@@ -30,14 +30,12 @@
 	info, err := source.SignatureHelp(ctx, f, rng.Start)
 	if err != nil {
 		s.session.Logger().Infof(ctx, "no signature help for %s:%v:%v : %s", uri, int(params.Position.Line), int(params.Position.Character), err)
+		return nil, nil
 	}
 	return toProtocolSignatureHelp(info), nil
 }
 
 func toProtocolSignatureHelp(info *source.SignatureInformation) *protocol.SignatureHelp {
-	if info == nil {
-		return &protocol.SignatureHelp{}
-	}
 	return &protocol.SignatureHelp{
 		ActiveParameter: float64(info.ActiveParameter),
 		ActiveSignature: 0, // there is only ever one possible signature