https://github.com/codefresh-io/go-sdk
Codefresh SDK for Golang
https://github.com/codefresh-io/go-sdk
codefresh go golang gopher sdk
Last synced: 3 months ago
JSON representation
Codefresh SDK for Golang
- Host: GitHub
- URL: https://github.com/codefresh-io/go-sdk
- Owner: codefresh-io
- License: apache-2.0
- Created: 2018-12-28T15:27:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-09-09T16:40:38.000Z (4 months ago)
- Last Synced: 2025-09-09T19:58:54.587Z (4 months ago)
- Topics: codefresh, go, golang, gopher, sdk
- Language: Go
- Size: 3.36 MB
- Stars: 11
- Watchers: 10
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Codefresh SDK for Golang
[]( https://g.codefresh.io/public/accounts/codefresh-inc/pipelines/codefresh-io/go-sdk/go-sdk)
[](https://godoc.org/github.com/codefresh-io/go-sdk)
[](https://goreportcard.com/report/github.com/codefresh-io/go-sdk)
# Start
`go get -u github.com/codefresh-io/go-sdk`
```go
import (
"fmt"
"os"
"github.com/codefresh-io/go-sdk/pkg/utils"
"github.com/codefresh-io/go-sdk/pkg"
)
func main() {
path := fmt.Sprintf("%s/.cfconfig", os.Getenv("HOME"))
options, err := utils.ReadAuthContext(path, "")
if err != nil {
fmt.Println("Failed to read codefresh config file")
panic(err)
}
clientOptions := codefresh.ClientOptions{Host: options.URL,
Auth: codefresh.AuthOptions{Token: options.Token}}
cf := codefresh.New(&clientOptions)
pipelines, err := cf.Pipelines().List()
if err != nil {
fmt.Println("Failed to get Pipelines from Codefresh API")
panic(err)
}
for _, p := range pipelines {
fmt.Printf("Pipeline: %+v\n\n", p)
}
}
```
This is not an official Codefresh project.