How to start a new project in golang?

$ go mod init carexample.com

This is produce a go.mod file

Next add a go file including main() function in it.

package main

import "fmt"

func main() {

fmt.println("Hello welcome to new cars example go lang application!")

}

How to run this?

go run .

Leave a Comment