z

package
v0.0.0-...-c08e797 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

模板制作

Index

Constants

View Source
const T = ``

Variables

This section is empty.

Functions

func Exists

func Exists(dir string) bool

func MakeDirs

func MakeDirs(s ...string) string

func NewQ

func NewQ() []*survey.Question

Types

type Answer

type Answer struct {
	Project string
	Author  string
	Workdir string
}

func NewAnswer

func NewAnswer() *Answer

type C

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

func NewC

func NewC() *C

func (*C) AddExclude

func (this *C) AddExclude(excludes ...string) *C

func (*C) AddMSS

func (this *C) AddMSS(key, value string) *C

func (*C) Create

func (this *C) Create()

func (*C) SetDir

func (this *C) SetDir(dir string) *C

func (*C) SetExcludes

func (this *C) SetExcludes(excludes MSB) *C

func (*C) SetMSS

func (this *C) SetMSS(mss MSS) *C

type MSB

type MSB = map[string]bool

type MSI

type MSI = map[string]interface{}

type MSS

type MSS = map[string]string

type Node

type Node struct {
	Name    string  `json:"name,omitempty"`
	Dir     string  `json:"dir,omitempty"`
	IsDir   bool    `json:"isDir"`
	Content string  `json:"content,omitempty"`
	Childs  []*Node `json:"childs,omitempty"`
}

func NewNode

func NewNode(name, dir string, isDir bool) *Node

func (*Node) AddNodes

func (this *Node) AddNodes(childs ...*Node)

func (*Node) Build

func (this *Node) Build(an *Answer)

func (*Node) SetContent

func (this *Node) SetContent(content string)

func (*Node) Write

func (this *Node) Write(name string)

Jump to

Keyboard shortcuts

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