Go

Compiled, batteries-included language for fast CLIs, services, and tooling

Quick summary

Go is a statically typed, compiled language designed for simplicity, fast builds, and great tooling. Datakraften installs Go as a first-class runtime so you can build CLIs, backend services, and developer tools out of the box.

Common tasks

Basic Usage

go version

Basic Usage

mkdir myapp && cd myapp

Basic Usage

go mod init example.com/myapp

Basic Usage

go run .

What is it?

Go is a statically typed, compiled language designed for simplicity, fast builds, and great tooling. Datakraften installs Go as a first-class runtime so you can build CLIs, backend services, and developer tools out of the box.

Basic Usage

Check the installed version:

$go version

Create a new module:

$mkdir myapp && cd myapp
$go mod init example.com/myapp

Run a program:

$go run .

Build a binary:

$go build

Run tests:

$go test ./...

Add a dependency:

$go get github.com/spf13/cobra

Format code:

$go fmt ./...

Tips

Go modules are the default dependency system. Run go mod init once per project.
Use go test ./... to run all tests in the current module.
Use gofmt or go fmt consistently -- formatting is part of the standard Go workflow.