We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to run the below example from the OpsGenie site: https://docs.opsgenie.com/docs/opsgenie-go-api-v2
package main import ( "fmt" "github.com/opsgenie/opsgenie-go-sdk-v2/alert" "github.com/opsgenie/opsgenie-go-sdk-v2/client" "github.com/opsgenie/opsgenie-go-sdk-v2/policy" ) func main() { //create a policy client policyClient, err := policy.NewClient(&client.Config{ApiKey: "your api key"}) if err != nil { fmt.Println("error occured while creating policy client") return } //create a request object createAlertPolicyRequest := &policy.CreateAlertPolicyRequest{ MainFields: policy.MainFields{ Name: "my alert policy", Enabled: false, PolicyDescription: "a policy", }, Message: "a message", Continue: false, Alias: "an alias", Priority: alert.P1, } //function call to process the request createAlertPolicyResult, err := policyClient.CreateAlertPolicy(nil, createAlertPolicyRequest) if err != nil { fmt.Printf("error: %s\n", err) } else { fmt.Sprintf("result: %v+: ", createAlertPolicyResult) } }
Getting the following error
../../go/src/github.com/opsgenie/opsgenie-go-sdk-v2/client/config.go:90:14: undefined: logrus.TraceLevel ../../go/src/github.com/opsgenie/opsgenie-go-sdk-v2/client/metric.go:104:29: multiple-value uuid.NewV4() in single-value context
The text was updated successfully, but these errors were encountered:
It seems like that you should update your dependencies. Old versions of some packages were used in your environment somehow.
Sorry, something went wrong.
@metehanozturk
It looks like the the client package is using github.com/satori/go.uuid for uuid generation, which had a breaking change to the uuid.NewV4() function.
client
uuid.NewV4()
Also, the satori uuid package should likely be replaced with another package, as it has effectively been abandoned - see satori/go.uuid#84.
@zsgilber We fixed the problem. Thanks!
No branches or pull requests
Trying to run the below example from the OpsGenie site:
https://docs.opsgenie.com/docs/opsgenie-go-api-v2
Getting the following error
The text was updated successfully, but these errors were encountered: