feat(aa-log): add AppArmorProfile.String using a template.
This commit is contained in:
parent
4f40cb6d78
commit
574891d445
3 changed files with 341 additions and 0 deletions
|
|
@ -18,3 +18,14 @@ type AppArmorProfile struct {
|
|||
func NewAppArmorProfile() *AppArmorProfile {
|
||||
return &AppArmorProfile{}
|
||||
}
|
||||
|
||||
// String returns the formatted representation of a profile as a string
|
||||
func (p *AppArmorProfile) String() string {
|
||||
var res bytes.Buffer
|
||||
err := tmplAppArmorProfile.Execute(&res, p)
|
||||
if err != nil {
|
||||
return err.Error()
|
||||
}
|
||||
return res.String()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue