content

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package content provides functions for content handling such as content type detection.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger holds the global logger that can be override by another logger
	Logger *log.Logger
)

Functions

This section is empty.

Types

type Content

type Content struct {
	// contains filtered or unexported fields
}

Content represents a content

func New

func New(o Options) *Content

New returns a content by the given options

func (*Content) ContentType

func (c *Content) ContentType() string

ContentType returns the content type

func (*Content) KnownType

func (c *Content) KnownType() string

KnownType returns the known type

type Options

type Options struct {
	// Reader holds the reader
	Reader *bufio.Reader
	// MimeType holds the mime type
	MimeType string
}

Options represents the options than can be set when creating a new content

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL