Install Go applications
You can install Go(lang) applications from the source code with the command go install
. With go
being a tool for managing Go source code,
go install
command is used to compile and install packages and dependencies.
To install Go applications you'll need to make sure you have Go installed in the workspace. You can do this by running go version
in your terminal. If Go is installed, it will return the version, if not, you'll need to install Go first.
Note
Go is not installed by default in Alnoda workspaces. You can install Go in awny Alnoda with the command wrk install go
The first thing to do is to install Go in the workspace:
Warning
After installing Go please reload terminal
Now you can install any go application with the command go install
. Let's install hey
- HTTP load generator:
You can now use hey to send some load to a web application. For example, if you want to send 1000 requests to http://localhost:8080
,
you can do so as follows:
Alnoda Hub
If you are planning to register Go application in the Alnoda Hub, you need to start installation script with the command that installs Go and set environmental variables:
wrk install go
export PATH="$PATH:/home/abc/go/bin"