how to convert array of string to string in golang?

Hi Friends 👋,

Welcome To aGuideHub! ❤️

To convert array of string to string in golang, just use strings.Join() method it will convert array of string to string. Only you have to pass array of string and seprator.

Follow the below tutorial if you are struggling with installing GO in windows.

Today, I will show you how do I convert array of string to string in golang, as above mentioned I’m going to use strings.Join() way.

To use Join() method we have to import "strings" package.

Let’s start our Golang convert array of string to string example


package main
import (

func main() {
	stringArray := []string {"","",""}
  	justString := strings.Join(stringArray,",")

In the above example, we have converted type []string to string and printed in golang console. let’s check the output.


I hope it helps you, All the best 👍.

Try it Yourself

Premium Content

You can get all the below premium content directly in your mail when you subscribe us


Interview Questions

Soon You will get CSS, JavaScript, React Js, and TypeScript So Subscribe to it.

Portfolio Template

View | Get Source Code

Cheat Sheets

Cheat Sheets Books are basically Important useful notes which we use in our day-to-day life.

Related Posts