files

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppFs afero.Fs = afero.NewOsFs()

Global Afero Filesystem variable

Functions

func Compile

func Compile(template Template, overwrite bool)

Compiles a template and moves it over

func IsDsStore

func IsDsStore(path string) bool

Ignores .DS_store

func RemoveThaumExtension

func RemoveThaumExtension(path string) string

Trims the .thaum extension from the path

func ThaumTemplates

func ThaumTemplates() ([]string, error)

Returns the available thaum templates

Types

type Template

type Template struct {
	Dirs      []string
	Files     []TemplateFile
	Variables map[string]string
	Name      string
}

A complete representation of a template that's stored in thaum_files.

func GetTemplate

func GetTemplate(template string) (Template, error)

From a template name, returns a complete template

func (Template) Update

func (t Template) Update() Template

Updates the TemplateFiles inside the template

type TemplateFile

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

An individual file inside of the template

Jump to

Keyboard shortcuts

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