generator

package
v2.0.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts *Options) (*genny.Generator, error)

New generator to create a grift task

Types

type Generator

type Generator struct{}

func (Generator) CmdAliases

func (Generator) CmdAliases() []string

func (Generator) CmdName

func (Generator) CmdName() string

func (Generator) Description

func (Generator) Description() string

func (*Generator) Generate

func (gen *Generator) Generate(ctx context.Context, root string, args []string) error

func (Generator) PluginName

func (Generator) PluginName() string

type Options

type Options struct {
	Name       name.Ident   `json:"name"`
	Parts      []name.Ident `json:"parts"`
	Args       []string     `json:"args"`
	Namespaced bool         `json:"namespaced"`
}

Options for creating a new grift task

func (Options) Last

func (opts Options) Last(n name.Ident) bool

Last checks if the name is the last of the parts

func (*Options) Validate

func (opts *Options) Validate() error

Validate options

Jump to

Keyboard shortcuts

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