diff --git a/formatter/formatter.go b/formatter/formatter.go index 7904a68..c9fbdff 100644 --- a/formatter/formatter.go +++ b/formatter/formatter.go @@ -21,7 +21,7 @@ func New(appConfig *config.Config, contentType string) ResponseFormatter { return &jsonFormatter{} } else if strings.Contains(contentType, "text/html") { return &htmlFormatter{} - } else if strings.Index(contentType, "text") == -1 && strings.Index(contentType, "application") == -1 { + } else if !strings.Contains(contentType, "text") && !strings.Contains(contentType, "application") { return &binaryFormatter{} } else { return &TextFormatter{}