pkgimport

command
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

pkgimport

Requirements

Go version >= 1.9.

Download and install

go get -u -v github.com/wzshiming/gotype/cmd/pkgimport

Commands

import "mime"

pkgimport -p mime -i mime -o mime.go

or

go generate
// Code generated by "pkgimport -p mime -i mime -o mime.go"; DO NOT EDIT.
// Install by "go get -u -v github.com/wzshiming/gotype/cmd/pkgimport";
//go:generate pkgimport -p mime -i mime -o mime.go

package mime

import (
	origin "mime"
)

// Value
var (

	// QEncoding represents the Q-encoding scheme as defined by RFC 2047.
	QEncoding = origin.QEncoding

	// ErrInvalidMediaParameter is returned by ParseMediaType if
	// the media type value was found but there was an error parsing
	// the optional parameters
	ErrInvalidMediaParameter = origin.ErrInvalidMediaParameter

	// BEncoding represents Base64 encoding scheme as defined by RFC 2045.
	BEncoding = origin.BEncoding
)

// Type
type (

	// A WordEncoder is an RFC 2047 encoded-word encoder.
	WordEncoder = origin.WordEncoder

	// A WordDecoder decodes MIME headers containing RFC 2047 encoded-words.
	WordDecoder = origin.WordDecoder
)

// Function
var (

	// TypeByExtension returns the MIME type associated with the file extension ext.
	// The extension ext should begin with a leading dot, as in ".html".
	// When ext has no associated type, TypeByExtension returns "".
	//
	// Extensions are looked up first case-sensitively, then case-insensitively.
	//
	// The built-in table is small but on unix it is augmented by the local
	// system's mime.types file(s) if available under one or more of these
	// names:
	//
	// /etc/mime.types
	// /etc/apache2/mime.types
	// /etc/apache/mime.types
	//
	// On Windows, MIME types are extracted from the registry.
	//
	// Text types have the charset parameter set to "utf-8" by default.
	TypeByExtension = origin.TypeByExtension

	// ParseMediaType parses a media type value and any optional
	// parameters, per RFC 1521.  Media types are the values in
	// Content-Type and Content-Disposition headers (RFC 2183).
	// On success, ParseMediaType returns the media type converted
	// to lowercase and trimmed of white space and a non-nil map.
	// If there is an error parsing the optional parameter,
	// the media type will be returned along with the error
	// ErrInvalidMediaParameter.
	// The returned map, params, maps from the lowercase
	// attribute to the attribute value with its case preserved.
	ParseMediaType = origin.ParseMediaType

	// FormatMediaType serializes mediatype t and the parameters
	// param as a media type conforming to RFC 2045 and RFC 2616.
	// The type and parameter names are written in lower-case.
	// When any of the arguments result in a standard violation then
	// FormatMediaType returns the empty string.
	FormatMediaType = origin.FormatMediaType

	// ExtensionsByType returns the extensions known to be associated with the MIME
	// type typ. The returned extensions will each begin with a leading dot, as in
	// ".html". When typ has no associated extensions, ExtensionsByType returns an
	// nil slice.
	ExtensionsByType = origin.ExtensionsByType

	// AddExtensionType sets the MIME type associated with
	// the extension ext to typ. The extension should begin with
	// a leading dot, as in ".html".
	AddExtensionType = origin.AddExtensionType
)

License

Licensed under the MIT License. See LICENSE for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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