我有一个作为参数的方法v ...interface{},我需要在这个切片前面加上一个string. 这是方法:


func (l Log) Error(v ...interface{}) {

  l.Out.Println(append([]string{" ERROR "}, v...))

}

当我尝试append()它不起作用时:


> 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

在这种情况下预先准备的正确方法是什么?