templater

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteClient

func NewRemoteClient(urlStr string, ops ...option) (*remoteClient, error)

func WithHttpClient

func WithHttpClient(client *http.Client) option

Types

type AppTemplate

type AppTemplate struct {
	Name  string
	Bg    string
	Tmpls []*Templater
}

AppTemplate is info for creating app

type RemoteAppSetting

type RemoteAppSetting struct {
	Name      string   `yaml:"name"`
	BgPath    string   `yaml:"bg-file-path"`
	Templates []string `yaml:"templates"`
}

type Templater

type Templater struct {
	Tmpl Tmpl
	Dir  string
	Name string
}

Templater is stuct for executing template

func (*Templater) Create

func (t *Templater) Create(curDir string, data interface{}) error

Create is creating file with template (using go fmt...)

type Tmpl

type Tmpl interface {
	String() (string, error)
}

Jump to

Keyboard shortcuts

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