gokoku

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 11 Imported by: 1

README

gokoku

Test Status Coverage Status MIT License GoDoc

gokoku for scaffolding

Synopsis

data := interface{}{}
err := gokoku.Scaffold(http.Dir("templatedir", ".", "dstdir", data)

Description

scaffolding from http.FileSystem

Installation

% go get github.com/Songmu/gokoku

Author

Songmu

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *log.Logger

Logger is replaceable logger

Functions

func LoadPlugin

func LoadPlugin(plugPath string) (http.FileSystem, error)

LoadPlugin is experimental feature to get http.FileSystem from Go plugin

func Scaffold

func Scaffold(hfs fs.FS, root, dst string, data interface{}) error

Scaffold directory from http.FileSystem

Types

type Tmpl

type Tmpl struct {
	IncludeVCSDir, ExcludeDotDir bool
	Suffix                       string
}

Tmpl is a struct for scaffolding

func (*Tmpl) Scaffold

func (tpl *Tmpl) Scaffold(
	hfs fs.FS,
	root, dst string,
	data interface{}) error

Scaffold directory from http.FileSystem

Jump to

Keyboard shortcuts

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