generate

package
v1.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitSlice

func SplitSlice[S []E, E any](s S, iteratee func(item E, index int) bool) (s1 S, s2 S)

SplitSlice splits an input slice into two output slices depending on the iteratee function.

If the function returns true, then the element is placed in the first output slice. If not, the element is placed in the second output slice.

Types

type Runner

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

Runner represents a craft generation parameters.

Associated to it are functions for generate command. An Runner should always be created with NewExecutor or unexpected behaviors will occur.

func NewRunner

func NewRunner(ctx context.Context, config models.CraftConfig, opts models.GenerateOptions) (*Runner, error)

NewRunner creates a new executor from given craft configuration and destdir.

func (*Runner) Run

func (e *Runner) Run(ctx context.Context) (models.CraftConfig, error)

Run initializes all languages found in current directory and execute all templates found in executor srcdir to executor destdir directory.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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