Giter Club home page Giter Club logo

go-build's Introduction

Go Build Cloud Native Buildpack

The Go Build CNB executes the go build compilation process for Go programs. The buildpack builds the source code in the application directory into an executable and sets it as the start command for the image.

Integration

The Go Build CNB does not provide any dependencies. However, in order to execute the go build compilation process, the buildpack requires the go dependency that can be provided by a buildpack like the Go Distribution CNB.

Usage

To package this buildpack for consumption:

$ ./scripts/package.sh

This builds the buildpack's Go source using GOOS=linux by default. You can supply another value as the first argument to package.sh.

buildpack.yml Configurations

go:
  # The go.targets property allows you to specify multiple programs to be
  # compiled. The first target will be used as the start command for the image.
  targets:
  - ./cmd/web-server
  - ./cmd/debug-server

  build:

    # The go.build.flags property allows you to override the default build
    # flags when compiling your program.
    flags:
    - -buildmode=default
    - -tags=paketo
    - -ldflags="-X main.variable=some-value"

    # The go.build.import-path property allows you to specify an import path
    # for your application. This is necessary if you are building a $GOPATH
    # application that imports its own sub-packages.
    import-path: example.com/some-app

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.