Last active
August 6, 2021 11:41
-
-
Save percybolmer/6f06d8af9919afea175bedea41244fcb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getProjects is a function that lists all projects | |
func getProjects(client *jira.Client) { | |
// use the Project domain to list all projects | |
projectList, _, err := client.Project.GetList() | |
if err != nil { | |
log.Fatal(err) | |
} | |
// Range over the projects and print the key and name | |
for _, project := range *projectList { | |
fmt.Printf("%s: %s\n", project.Key, project.Name) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment