Compatibility • Usage example • CI Status • License
go-jira is a Go package for working with Jira REST API.
Important
Please note that this package only supports retrieving data from the Jira API (i.e. you cannot create or modify data with this package).
| Version | 6.x |
7.x |
8.x |
9.x |
cloud |
|---|---|---|---|---|---|
1.x |
Full | Partial | Partial | Partial | No |
2.x |
Full | Full | Full | Partial | No |
package main
import (
"fmt"
"github.com/essentialkaos/go-jira/v3"
)
func main() {
// Create API instance with basic auth
api, err := jira.NewAPI("https://jira.domain.com", jira.AuthBasic{"john", "MySuppaPAssWOrd"})
// or with personal token auth
api, err = jira.NewAPI("https://jira.domain.com", jira.AuthToken{"avaMTxxxqKaxpFHpmwHPXhjmUFfAJMaU3VXUji73EFhf"})
api.SetUserAgent("MyApp", "1.2.3")
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
issue, err := api.GetIssue(
"SAS-1956", jira.IssueParams{
Expand: []string{"changelog"},
},
)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Printf("%-v\n", issue)
}| Branch | Status |
|---|---|
master (Stable) |
|
develop (Unstable) |
Before contributing to this project please read our Contributing Guidelines.