
core
Download and Install Go
Linux, macOS, and FreeBSD tarballs
Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go
. For example:
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
Choose the archive file appropriate for your installation. For instance, if you are installing Go version 1.2.1 for 64-bit x86 on Linux, the archive you want is called go1.2.1.linux-amd64.tar.gz
.
(Typically these commands must be run as root or through sudo.)
Add /usr/local/go/bin
to the PATH environment variable. You can do this by adding this line to your /etc/profile
(for a system-wide installation) or $HOME/.profile
:
export PATH=$PATH:/usr/local/go/bin
Note: changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile
.
macOS package installer
Download the package file, open it, and follow the prompts to install the Go tools. The package installs the Go distribution to /usr/local/go
.
The package should put the /usr/local/go/bin directory
in your PATH environment variable. You may need to restart any open Terminal sessions for the change to take effect.
Windows
Open the MSI file and follow the prompts to install the Go tools. By default, the installer puts the Go distribution in C:\Go
.
The installer should put the C:\Go\bin
directory in your PATH environment variable. You may need to restart any open command prompts for the change to take effect.
Zip archive
Download the zip file and extract it into the directory of your choice (we suggest C:\Go
).
Add the bin
subdirectory of your Go root (for example, C:\Go\bin
) to your PATH environment variable.
Setting environment variables under Windows
Under Windows, you may set environment variables through the "Environment Variables" button on the "Advanced" tab of the "System" control panel. Some versions of Windows provide this control panel through the "Advanced System Settings" option inside the "System" control panel.
Setting up the repository
Clone the repository
Use git
to clone the repository:
git clone https://github.com/iborg-ai/core.git
Install the dependencies
The package uses Go Modules to manage dependencies. Install dependencies by typing:
go mod download
Run the package
Run the package by typing:
go run ./src/main
Run tests
go test -v ./src/* -race -coverprofile=coverage.txt -covermode=atomic
Build the package
Generate a binary build for your operating system by typing:
# For Windows
env GOOS=windows GOARCH=amd64 go build -o ./bin/windows/core-winx64.exe ./src/main
# For macOS
env GOOS=darwin GOARCH=amd64 go build -o ./bin/darwin/core-macosx64 ./src/main
# For Linux
env GOOS=linux GOARCH=amd64 go build -o ./bin/linux/core-linux-x64 ./src/main
License
MIT licensed. See the LICENSE file for details.