pkg/urlhaus/api.go

Summary

Maintainability
A
50 mins
Test Coverage

Method Client.IsBad has 8 return statements (exceeds 4 allowed).
Open

func (client *Client) IsBad(parent context.Context, msg *queue.DomainAccessMessage) bool {
    ctx, cancel := context.WithTimeout(parent, timeout)
    defer cancel()

    request, err := http.NewRequestWithContext(ctx, "POST", url+"/v1/host", bytes.NewBuffer([]byte("host="+msg.Domain)))
Severity: Major
Found in pkg/urlhaus/api.go - About 50 mins to fix

    exported method Client.Connect should have comment or be unexported
    Open

    func (client *Client) Connect() error {
    Severity: Minor
    Found in pkg/urlhaus/api.go by golint

    exported method Client.IsAsync should have comment or be unexported
    Open

    func (client *Client) IsAsync() bool {
    Severity: Minor
    Found in pkg/urlhaus/api.go by golint

    exported method Client.IsBad should have comment or be unexported
    Open

    func (client *Client) IsBad(parent context.Context, msg *queue.DomainAccessMessage) bool {
    Severity: Minor
    Found in pkg/urlhaus/api.go by golint

    There are no issues that match your filters.

    Category
    Status