diff options
Diffstat (limited to 'media/mediaType.go')
-rw-r--r-- | media/mediaType.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/media/mediaType.go b/media/mediaType.go index 8204fc435..367c8ecc9 100644 --- a/media/mediaType.go +++ b/media/mediaType.go @@ -129,15 +129,6 @@ func FromStringAndExt(t, ext string) (Type, error) { return tp, nil } -// MustFromString is like FromString but panics on error. -func MustFromString(t string) Type { - tp, err := FromString(t) - if err != nil { - panic(err) - } - return tp -} - // FromString creates a new Type given a type string on the form MainType/SubType and // an optional suffix, e.g. "text/html" or "text/html+html". func FromString(t string) (Type, error) { @@ -209,14 +200,6 @@ func (m *Type) init() { } } -// WithDelimiterAndSuffixes is used in tests. -func WithDelimiterAndSuffixes(t Type, delimiter, suffixesCSV string) Type { - t.Delimiter = delimiter - t.SuffixesCSV = suffixesCSV - t.init() - return t -} - func newMediaType(main, sub string, suffixes []string) Type { t := Type{MainType: main, SubType: sub, SuffixesCSV: strings.Join(suffixes, ","), Delimiter: DefaultDelimiter} t.init() @@ -315,7 +298,6 @@ func (t Types) IsTextSuffix(suffix string) bool { } } return false - } func (m Type) hasSuffix(suffix string) bool { |