Help Center/ ImageSearch/ SDK Reference/ Using the Go SDK/ Preparing a Go Development Environment
Updated on 2022-02-22 GMT+08:00

Preparing a Go Development Environment

To use the Go SDK of ImageSearch, you need to configure the Go development environment. If the Go development environment has been installed, skip this section.

  1. Download the Go SDK of the required version from the golang official website and install it. The SDK supports go 1.14 version or later.
  2. Install the downloaded Go in a specified path, for example, D:\develop\go.
  3. Right-click Computer, choose Properties > Advanced System Settings > Environment Variables, and perform the following operations:
    1. Create system variable GOROOT whose value is the Go installation path. Add environment variable GOPATH, which indicates the directory where the Go project is located.
    2. Append ;%GOROOT%\bin (path of the Go compiler) to the PATH variable.
    3. Append ;%GOROOT%\lib (path of the Go compiler) to the CLASSPATH variable.
  4. Download the vs code of the operating system from the vs code official website.
  5. Install the Go and Go Critic plug-ins.