Golang runtime.GOROOT() function example

package runtime

Golang runtime.GOROOT() function usage example.

NOTE : There is where the Golang's source code, binary, blogs and documentations located in your machine

 package main

 import (
 "fmt"
 "runtime"
 )

 func main() {
 fmt.Println("The GROOT says GO ROOT is at : ", runtime.GOROOT())

 }

Reference :

http://golang.org/pkg/runtime/#GOROOT

Advertisement