github.com/hashicorp/packer@v1.14.3/command/flag-kv/flag_strings.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  package kvflag
     5  
     6  import (
     7  	"strings"
     8  )
     9  
    10  type StringSlice []string
    11  
    12  func (s *StringSlice) String() string {
    13  	return strings.Join(*s, ", ")
    14  }
    15  
    16  func (s *StringSlice) Set(value string) error {
    17  	*s = append(*s, value)
    18  	return nil
    19  }