xmidt-org/wrp-go

View on GitHub
format.go

Summary

Maintainability
A
35 mins
Test Coverage

Function FormatFromContentType has 5 return statements (exceeds 4 allowed).
Open

func FormatFromContentType(contentType string, fallback ...Format) (Format, error) {
    if len(contentType) == 0 {
        if len(fallback) > 0 {
            return fallback[0], nil
        }
Severity: Major
Found in format.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status