package internal
import (
"gitlab.com/pcanilho/go-jira"
"strings"
)
func (j *jiraController) SearchProjects(pKeys ...string) ([]jira.Project, error) {
var projectKeys string
if pKeys != nil && len(pKeys) > 0 {
projectKeys = strings.Join(pKeys, ",")
}
pList, _, err := j.client.Project.ListWithOptionsWithContext(j.ctx, &jira.GetQueryOptions{
ProjectKeys: projectKeys,
})
if err != nil {
return nil, err
}
var out []jira.Project
for _, p := range *pList {
out = append(out, jira.Project{
Expand: p.Expand,
Self: p.Self,
ID: p.ID,
Key: p.Key,
Name: p.Name,
AvatarUrls: p.AvatarUrls,
ProjectCategory: p.ProjectCategory,
IssueTypes: p.IssueTypes,
})
}
return out, nil
}
|
The pages are generated with Golds v0.3.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |