seed: Index | Files

package inbed

import ""


Package Files

development.go inbed.go


var ImporterName = "inbed.go"

ImporterName is the name of the go source file that imports the generated inbed package.

var PackageName = "inbed"

PackageName is the name of the generated package.

var Root = filepath.Dir(os.Args[0])

Root is the location of the project (defaults to the directory the binary is running from).

func Done Uses

func Done() error

Done should be called after all calls to File and before any calls to Open.

func File Uses

func File(name string)

File embeds the named file inside your code, relative to the location of the binary. If the file is a directory, the entire directory is recursively embedded.

func Open Uses

func Open(name string) (http.File, error)

Open opens a previously embedded file. If Done hasn't been called, it is called.

type FileSystem Uses

type FileSystem struct {
    Prefix string

FileSystem implements net/http.FileSystem

func (FileSystem) Open Uses

func (fs FileSystem) Open(name string) (http.File, error)

Open implements http.FileSystem with inbed.Open

func (FileSystem) ServeHTTP Uses

func (fs FileSystem) ServeHTTP(w http.ResponseWriter, r *http.Request)

Package inbed imports 22 packages (graph) and is imported by 2 packages. Updated 2020-02-26. Refresh now. Tools for package owners.