Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
ErrNoConfig is the error to be returned if there are no config files
Functions ¶
This section is empty.
Types ¶
type BasicGenerator ¶
type BasicGenerator struct { SourceFolder string I18NFolder string ConfigFolder string OutputFolder string IgnorePattern string ScannerFactory func([]string) Scanner CollectorFactory func(string, string) Collector RendererFactory func(string, *regexp.Regexp) Renderer }
func (*BasicGenerator) Generate ¶
func (g *BasicGenerator) Generate(isos string) error
type Collector ¶
Collector defines the interface for collecting config and translation data
type Data ¶
Data contains all the collected data
type Generator ¶
Example ¶
// log.SetOutput(ioutil.Discard) if err := New(os.Getenv("PWD")+"/test", "ignore").Generate("*"); err != nil { fmt.Println("generation aborted:", err) } fmt.Println("ok")
Output: ok
type Render ¶
type Renderer ¶
type Scanner ¶
type Scanner interface {
Scan() []TmplFolder
}
type SimpleCollector ¶
func (SimpleCollector) AvailableISOs ¶
func (c SimpleCollector) AvailableISOs() []string
func (SimpleCollector) Collect ¶
func (c SimpleCollector) Collect(iso string) (Data, error)
type TmplScanner ¶
type TmplScanner []string
func (TmplScanner) Scan ¶
func (ts TmplScanner) Scan() []TmplFolder
Click to show internal directories.
Click to hide internal directories.