mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-18 20:23:28 +02:00
19 lines
379 B
Go
19 lines
379 B
Go
package jiradata
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// Find will search the transitions for one that matches
|
|
// the given name. It will return a valid trantion that matches
|
|
// or nil
|
|
func (t Transitions) Find(name string) *Transition {
|
|
name = strings.ToLower(name)
|
|
for _, trans := range t {
|
|
if strings.Contains(strings.ToLower(trans.Name), name) {
|
|
return trans
|
|
}
|
|
}
|
|
return nil
|
|
}
|