previewer

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 1 module, 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.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtJSMap = map[string]template.HTML{
	".go":     "golang",
	".php":    "php",
	".py":     "python",
	".json":   "json",
	".md":     "markdown",
	".sql":    "sql",
	".js":     "javascript",
	".css":    "css",
	".less":   "less",
	".sass":   "sass",
	".cpp":    "c_cpp",
	".rb":     "ruby",
	".ini":    "ini",
	".yaml":   "yaml",
	".yml":    "yaml",
	".xml":    "xml",
	".coffee": "coffee",
	".sh":     "sh",
}

Functions

func IsCode

func IsCode(ext string) bool

func Preview

func Preview(path string) (template.HTML, error)

Types

type Code

type Code struct {
	Ext string
}

func NewCode

func NewCode(ext string) *Code

func (*Code) Preview

func (i *Code) Preview(content []byte) template.HTML

type Image

type Image struct{}

func (*Image) Preview

func (i *Image) Preview(content []byte) template.HTML

type PDF

type PDF struct{}

func (*PDF) Preview

func (p *PDF) Preview(content []byte) template.HTML

TODO

type Previewer

type Previewer interface {
	Preview(content []byte) template.HTML
}

Jump to

Keyboard shortcuts

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