# Installation (Golang)

### Go package

Download and install [Go](https://go.dev/doc/install). We recommend to use go v1.18.0+ to use the binary efficiency.

### Install manually

Download go version 1.18.6 [here](https://go.dev/dl/go1.18.6.darwin-amd64.tar.gz) and unzip file.

Create go-src at home directory and move downloaded file to go-src:

```bash
mkdir ~/go-src
mv ~/Download/go ~/go-src/go1.18.6
# Rename go to respective version
```

Link go-src as goroot

```
ln -s ~/go-src/go1.18.6/ ~/goroot
```

Now we will export path of go from zshrc or bashrc

```bash
vim ~/.zshrc
#or
vim ~/.bashrc 
```

Add path as below to file .bashrc or .zshrc

```bash
export GOPATH=/usr/local/go
export PATH=$PATH:$GOPATH/bin
# This variable should already exist, but if it's not we have to add it

# Below this is must have variable
export GOPATH=~/go
export GOROOT=~/goroot
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
```

Update bash file

```bash
source ~/.zshrc
# or 
source ~/.bashrc
```

#### Go version

To make sure go version is installed appropriately type

```bash
go version
# go version go1.18.6 darwin/amd64 <-- or maybe different but we focus only version of go
```

### Google cloud utils

In order to download chain binary you need to install gsutil [here](https://cloud.google.com/storage/docs/gsutil_install).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sixnetwork.gitbook.io/nft-gen-2-tech-doc/getting-started/installation-golang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
