jira-bot/pkg/utils/jira.go

17 lines
286 B
Go
Raw Normal View History

2021-06-03 01:59:32 +03:00
package utils
import (
"git/ecom/jira-bot/pkg/config"
"github.com/andygrunwald/go-jira"
)
func GetClient(cfg *config.JiraConfig) (*jira.Client, error) {
jiraClient, err := jira.NewClient(cfg.Auth.Client(), cfg.Url)
if err != nil {
return nil, err
}
return jiraClient, nil
}