From aa8d0f2a1baa9a4145728ee6c4d2d732396f10eb Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 25 Oct 2023 14:50:21 +0200 Subject: [PATCH] attributedstring.Slice: add Set() method Needed in Buildah (and potentially Podman later on) where some options must be overridden. Ultimately this should be avoided whenever possible but this is not my goal at the present. Signed-off-by: Valentin Rothberg --- internal/attributedstring/slice.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/attributedstring/slice.go b/internal/attributedstring/slice.go index 234c9b136..ed5e15f6c 100644 --- a/internal/attributedstring/slice.go +++ b/internal/attributedstring/slice.go @@ -31,6 +31,11 @@ func (a *Slice) Get() []string { return a.Values } +// Set overrides the values of the Slice. +func (a *Slice) Set(values []string) { + a.Values = values +} + // UnmarshalTOML is the custom unmarshal method for Slice. func (a *Slice) UnmarshalTOML(data interface{}) error { iFaceSlice, ok := data.([]interface{})