From 032341206018d436d4a9bfa20b1170ad17f2aa8f Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Thu, 17 Mar 2022 14:10:53 +0100 Subject: [PATCH] Update api/apikeys.go Co-authored-by: Peter-Jan Brone --- api/apikeys.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apikeys.go b/api/apikeys.go index 317cb4e6..3b29b56e 100644 --- a/api/apikeys.go +++ b/api/apikeys.go @@ -51,7 +51,7 @@ func (akp APIKeyPOST) Validate() error { if !akp.Public && len(akp.Skylinks) > 0 { return errors.New("public API keys cannot refer to skylinlks") } - errs := make([]error, 0) + var errs []error for _, s := range akp.Skylinks { if !database.ValidSkylinkHash(s) { errs = append(errs, errors.New("invalid skylink:"+s))