Golang go/build.Context.ImportDir() function example

package go/build

ImportDir is like Import but processes the Go package found in the named directory.

Golang go/build.Context.ImportDir() function usage example

 var directory string
 pkg, err := build.Default.ImportDir(directory, 0)

Reference :

http://golang.org/pkg/go/build/#Context.ImportDir

Advertisement