From 264f30cf12e3273ce6d77e53e8d90d67b96ad9d3 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 30 May 2024 14:19:56 +0100 Subject: [PATCH] chore(aa): cosmetic. --- pkg/aa/profile.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/aa/profile.go b/pkg/aa/profile.go index 44d53a32..21181378 100644 --- a/pkg/aa/profile.go +++ b/pkg/aa/profile.go @@ -139,11 +139,12 @@ func (p *Profile) Format() { // GetAttachments return a nested attachment string func (p *Profile) GetAttachments() string { - if len(p.Attachments) == 0 { + switch len(p.Attachments) { + case 0: return "" - } else if len(p.Attachments) == 1 { + case 1: return p.Attachments[0] - } else { + default: res := []string{} for _, attachment := range p.Attachments { if strings.HasPrefix(attachment, "/") {