Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Main Repository

Disclaimer

To continue development with Go, it's highly recommended to read their documentation.

Prerequisites

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.

Installation

  1. Create a directory for your project.
  2. Open the directory using a Terminal tool utilizing the cd command.
  3. 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

image
  1. You should see a new file named golang.go in your project folder. Open it using an editor of your choice.
  2. 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"
)

Usage

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.

image

Thanks

Big thanks to @moeryomenko for submitting this code.

Need help?

Email - sales@decodo.com

Live chat 24/7