MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / Get

Method Get

cmd/discover.go:67–82  ·  view source on GitHub ↗
(key string, code string)

Source from the content-addressed store, hash-verified

65}
66
67func (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
84func (em ExistingMonitors) GetNameForCurrent() (string, error) {
85 for _, value := range em.Monitors {

Calls

no outgoing calls