Commit 9971cbee authored by johnnyjoy's avatar johnnyjoy

chore: fix linter

parent 8f51791d
......@@ -144,19 +144,3 @@ func ExtractActivityIDFromName(name string) (int32, error) {
}
return id, nil
}
// ExtractWebhookIDFromName returns the webhook ID from a resource name.
func ExtractWebhookIDFromName(name string) (string, error) {
tokens, err := GetNameParentTokens(name, UserNamePrefix, WebhookNamePrefix)
if err != nil {
return "", err
}
if len(tokens) != 2 {
return "", errors.Errorf("invalid webhook name format: %q", name)
}
webhookID := tokens[1]
if webhookID == "" {
return "", errors.Errorf("invalid webhook ID %q", webhookID)
}
return webhookID, nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment