I have a method that has an argument v ...interface{} , I need to add this fragment using string . Here is a way:
func (l Log) Error(v ...interface{}) { l.Out.Println(append([]string{" ERROR "}, v...)) }
When I try to use append() , it does not work:
> append("some string", v) first argument to append must be slice; have untyped string > append([]string{"some string"}, v) cannot use v (type []interface {}) as type string in append
What is the correct way to add in this case?
bachr source share