I want to grow vs.top = []string{“Hello”, “World”, “Something”, “Cool stuff”}
so basically I get the array updated by reading some data and I would like to update vs.top
Thanks
@Sandertv thanks, I would like to use with the string, if I use it then it gives me error
vs.Rules = []string{append(a, "Cool stuff")}
go run f5gohello.go
# command-line-arguments
./f5gohello.go:184:32: cannot use append(a, "Cool stuff") (type []string) as type string in array or slice literal
If you’d like to join them as a single string, you’ll have to use strings.Join(append(a, "Cool stuff"), " ") to join the strings with a space between the values.