Почему я не могу поставить аргументы в функции
func ex(c string,ex ...string) { exec.Command(c,ex) }
получить ошибку cannot use args (type []string) as type string.Почему?
cannot use args (type []string) as type string
Вы можете использовать: ex... в выражении exec.Command(c,ex...) вместо просто ex
ex...
exec.Command(c,ex...)
ex
Ниже в качестве примера:
func ex(c string,ex ...string) { exec.Command(c,ex...) }