From bc32c3d353036a0245def8df780646c10fa462d1 Mon Sep 17 00:00:00 2001 From: Dave Day Date: Tue, 7 Apr 2015 16:19:24 +1000 Subject: [PATCH] appengine: name returned parameters on SignBytes to improve documentation Change-Id: I6dcb7e070a0c5f84772e5af2c593f4390eefeb7a --- identity.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/identity.go b/identity.go index 336e3ff..b8dcf8f 100644 --- a/identity.go +++ b/identity.go @@ -126,15 +126,14 @@ func ServiceAccount(c context.Context) (string, error) { } // SignBytes signs bytes using a private key unique to your application. -func SignBytes(c context.Context, bytes []byte) (string, []byte, error) { +func SignBytes(c context.Context, bytes []byte) (keyName string, signature []byte, err error) { req := &pb.SignForAppRequest{BytesToSign: bytes} res := &pb.SignForAppResponse{} - err := internal.Call(c, "app_identity_service", "SignForApp", req, res) - if err != nil { + if err := internal.Call(c, "app_identity_service", "SignForApp", req, res); err != nil { return "", nil, err } - return res.GetKeyName(), res.GetSignatureBytes(), err + return res.GetKeyName(), res.GetSignatureBytes(), nil } func init() {