mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
chore(aa): cosmetic.
This commit is contained in:
parent
fd46c0de30
commit
264f30cf12
1 changed files with 4 additions and 3 deletions
|
@ -139,11 +139,12 @@ func (p *Profile) Format() {
|
||||||
|
|
||||||
// GetAttachments return a nested attachment string
|
// GetAttachments return a nested attachment string
|
||||||
func (p *Profile) GetAttachments() string {
|
func (p *Profile) GetAttachments() string {
|
||||||
if len(p.Attachments) == 0 {
|
switch len(p.Attachments) {
|
||||||
|
case 0:
|
||||||
return ""
|
return ""
|
||||||
} else if len(p.Attachments) == 1 {
|
case 1:
|
||||||
return p.Attachments[0]
|
return p.Attachments[0]
|
||||||
} else {
|
default:
|
||||||
res := []string{}
|
res := []string{}
|
||||||
for _, attachment := range p.Attachments {
|
for _, attachment := range p.Attachments {
|
||||||
if strings.HasPrefix(attachment, "/") {
|
if strings.HasPrefix(attachment, "/") {
|
||||||
|
|
Loading…
Reference in a new issue