15 lines
235 B
Go
15 lines
235 B
Go
|
package opsgenie
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func checkOpsGenieResponse(code int, status string) error {
|
||
|
if code == http.StatusOK {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
return fmt.Errorf("Unexpected Status Code '%d', Response '%s'", code, status)
|
||
|
}
|