17 lines
286 B
Go
17 lines
286 B
Go
|
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
|
||
|
}
|