stcreator

package
v1.1.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentExtractor

type ContentExtractor func() (string, error)

ContentExtractor content extractor.

type D

type D struct {
	Name     string
	Children []I
}

D dir type.

func (*D) Accept

func (d *D) Accept(v Visitor, path string) error

Accept implement interface I.

func (*D) AddChildren

func (d *D) AddChildren(i I)

AddChildren add I to children.

type F

type F struct {
	Name     string
	Template interface{}
	Data     interface{}
}

F file type.

func (*F) Accept

func (f *F) Accept(v Visitor, path string) error

Accept implement interface I.

type I

type I interface {
	Accept(v Visitor, path string) error
}

I of concrete type file or dir.

type Visitor

type Visitor interface {
	VisitDir(d *D, path string) error
	VisitFile(f *F, path string) error
	Exists(path string) bool
}

Visitor of create concrete type.

func New

func New(data interface{}) Visitor

New new.

Jump to

Keyboard shortcuts

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