To continue development with Go, it's highly recommended to read their documentation.
You'll need the Go programming language installed and set up on your machine.
You should also have a Decodo account with access to the dashboard to get your credentials and endpoint information.
- Create a directory for your project.
- Open the directory using a Terminal tool utilizing the
cdcommand. - Copy the code directly from here, or execute the following command to download the proxy setup example file:
curl https://raw.githubusercontent.com/Decodo/Decodo/master/golang/golang.go > golang.go
- You should see a new file named
golang.goin your project folder. Open it using an editor of your choice. - To run this Go example, set your username, password, and endpoint information you'd like to use and enter them in the following sections of the code:
const (
resourceUrl = "https://ip.decodo.com/json"
proxyHost = "gate.decodo.com:7000"
username = "username"
password = "password"
)
To execute the Go example, simply enter go run golang.go in your Terminal tool.
You should see an IP address in the console window if everything was set up correctly.
Big thanks to @moeryomenko for submitting this code.
Email - sales@decodo.com
