Help Center> Image Recognition> SDK Reference> Using the Go SDK> Preparing a Go Development Environment
Updated on 2022-12-06 GMT+08:00

Preparing a Go Development Environment

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

  1. Download Go 1.14 or a later version from the Go official website.
  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 Visual Studio Code from the Visual Studio Code official website and install it.
  5. Install the Go and Go Critic plug-ins.