Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
/ golang-bundle Public archive

A bundle for Batect that provides a development container for Golang, with sensible default configuration.

License

Notifications You must be signed in to change notification settings

batect/golang-bundle

golang-bundle

Build Status License

A bundle for Batect that provides a development container for Golang, with sensible default configuration.

Usage

Setup

Add the following to your batect.yml:

include:
  - type: git
    repo: https://github.com/batect/golang-bundle.git
    ref: XXX # Replace with latest version from https://github.com/batect/golang-bundle/releases

Containers

golang-build-env

A container (based on the official Golang images) with sensible defaults for use with Golang.

It mounts the project directory into the container, enables run as current user mode and configures a cache for dependencies downloaded by Go.

Example

tasks:
  build:
    description: Build the project.
    group: Build tasks
    run:
      container: golang-build-env
      command: go build .

include:
  - type: git
    repo: https://github.com/batect/golang-bundle.git
    ref: XXX # Replace with latest version from https://github.com/batect/golang-bundle/releases

The Golang sample project also demonstrates how to use this bundle.

Development

Run ./batect --list-tasks to see a list of available tasks for this project.