Skip to content

Commit

Permalink
attributedstring.Slice: add Set() method
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vrothberg committed Oct 25, 2023
1 parent 6ed9ab0 commit aa8d0f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/attributedstring/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down

0 comments on commit aa8d0f2

Please sign in to comment.