title: how to use generics to merge two function in one in golang
body: <p>i have this two functions and i want to implement generics on it. just to know i tried <code>interface{}</code> and <code>[t any]</code> and <code>(t any)</code> and all field. and this is the code. if  you know how to use generics to make this two functions in one function. just write the code</p>
  <pre><code>func concat(args ...[]directory_account_price_discount_tax) []directory_account_price_discount_tax {
      concated := []directory_account_price_discount_tax{}
      for _, i := range args {
          concated = append(concated, i...)
      }
      return concated
  }
  
  func concat_strings_slice(args ...[]string) []string {
      concated := []string{}
      for _, i := range args {
          concated = append(concated, i...)
      }
      return concated
  }
  </code></pre>
  <p>and the struct of <code>directory_account_price_discount_tax</code> is</p>
  <pre><code>type directory_account_price_discount_tax struct {
      directory_no         []int
      Account              string
      Price, Discount, Tax float64
  }
  </code></pre>