Installing the Netezza Performance Server Go Driver

The procedure in this topic installs the Netezza Performance Server Go driver on any client system that has Go language 1.15 (or later) installed.

Before you begin

Ensure that Go language 1.15 or later is installed. Otherwise, the Go driver package installation will not work. Refer to https://golang.org/doc/install for installing Go language.

Once you have installed Go language on your Linux machine, you can use the go command line utility.

Go language packages are available in a public GitHub repository. If you want to use any package from the GitHub repository, clone it using the go get command. The go get command clones the source code of the package into $GOPATH/src directory on the application system.

Procedure

  1. Check $GOPATH and $GOROOT path on your machine using the following command:
    $ go env
  2. Execute the following command from any location on the machine to get Netezza Performance Server Go driver package:
    go get -u github.com/IBM/nzgo/v12

    This command clones the Netezza Performance Server Go Driver repository in $GOPATH/src directory.

  3. Confirm that nzgo package code is now present in following directory structure: $GOPATH/pkg/mod/github.com/IBM/nzgo/v12

Results

For more information on how to import remote packages, refer to https://golang.org/doc/code.html#remote