(key string, code string)
| 65 | } |
| 66 | |
| 67 | func (em ExistingMonitors) Get(key string, code string) lib.Monitor { |
| 68 | for _, value := range em.Monitors { |
| 69 | if code != "" { |
| 70 | if value.Attributes.Code == code { |
| 71 | return value |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | if key != "" { |
| 76 | if value.Attributes.Key == key { |
| 77 | return value |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | return lib.Monitor{} |
| 82 | } |
| 83 | |
| 84 | func (em ExistingMonitors) GetNameForCurrent() (string, error) { |
| 85 | for _, value := range em.Monitors { |
no outgoing calls