buildkite/go-buildkite
GitHub: buildkite/go-buildkite
Stars: 73 | Forks: 63
# buildkite-go [](https://pkg.go.dev/github.com/buildkite/go-buildkite/v5) [](https://buildkite.com/buildkite/go-buildkite)
A [Go](http://golang.org) library and client for the [Buildkite API](https://buildkite.com/docs/api). This project draws a lot of its structure and testing methods from [go-github](https://github.com/google/go-github).
# Usage
To get the package, execute:
go get github.com/buildkite/go-buildkite/v5
Simple shortened example for listing all pipelines:
import (
"github.com/buildkite/go-buildkite/v5"
"github.com/alecthomas/kingpin/v2"
)
var (
apiToken = kingpin.Flag("token", "API token").Required().String()
org = kingpin.Flag("org", "Organization slug").Required().String()
)
client, err := buildkite.NewOpts(buildkite.WithTokenAuth(*apiToken))
if err != nil {
log.Fatalf("client config failed: %s", err)
}
pipelines, _, err := client.Pipelines.List(*org, nil)
Note: not all API features are supported by `go-buildkite` just yet. If you need a feature, please make an [issue](https://github.com/buildkite/go-buildkite/issues) or submit a pull request.
# Releasing
1. Generate a changelog using [ghch](https://github.com/Songmu/ghch): `ghch --format=markdown --next-version=v`, and update it in `CHANGELOG.md`
2. Commit the changelog
3. Create a release using GitHub CLI: `gh release create`, ensuring you update the release notes with the new CHANGELOG.md content
# License
This library is distributed under the BSD-style license found in the LICENSE file.
标签:EVTX分析