cmd/web/main.go

Summary

Maintainability
A
1 hr
Test Coverage

Function handleDNSQuery has 9 return statements (exceeds 4 allowed).
Open

func handleDNSQuery(w http.ResponseWriter, r *http.Request) {
    var body []byte
    var err error

    switch r.Method {
Severity: Major
Found in cmd/web/main.go - About 55 mins to fix

    Function resolve has 7 return statements (exceeds 4 allowed).
    Open

    func resolve(ctx context.Context, question dnsmessage.Question, request []byte) []byte {
        if err := sem.Acquire(ctx, 1); err != nil {
            return nil
        }
        defer sem.Release(1)
    Severity: Major
    Found in cmd/web/main.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status