loader

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 9 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