Help us shape the future of Go! Take the 2026 Go Developer Survey

loader

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

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

Loader fetches remote templates from the project's github page or any HTTPS URL

func New

func New(client httpClient) Loader

New returns Loader

func (Loader) List

func (l Loader) List() ([]string, error)

List returns a list of template names from the project's github page

func (Loader) Load

func (l Loader) Load(path string) (tmpl []byte, url string, err error)

Load returns template contents and template URL or error path can be either any HTTPs URL or reference to the template on a project's github page

Jump to

Keyboard shortcuts

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