Hello Michele

This won't print in the array format rather it would print it in other way.
stringArray := []string{"Hello", "world", "!"}
        fmt.Printf("[%s]", strings.Join(stringArray , ","))

Output [Hello,world,!]



On Thursday, October 10, 2019 at 10:41:59 PM UTC+5:30, Michele Caci wrote:
>
> Hello Nalin, 
>
> If you use a slice of strings to hold your data, as an alternative you 
> could go with 
>
> fmt.Printf("[%s]", strings.Join(your_slice_of_strings, ",")) 
>
> Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/10afc2a5-bbc9-4a21-ab14-112b1cd3e74co%40googlegroups.com.

Reply via email to