creator

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator struct {
	common.CommandRunner
	common.FileSystem
	common.Template
	common.Logging

	Mode             Mode
	Path             string
	Package          string
	Name             string
	Description      string
	Copyright        string
	Overwrite        bool
	WithGit          bool
	WithDocker       bool
	WithGithubAction bool
}

Creator implements the "init" and "new" commands

func (Creator) Execute

func (creator Creator) Execute(project common.Project, cfg config.Config) error

Execute executes the command

func (Creator) RequiresBuild

func (creator Creator) RequiresBuild() bool

RequiresBuild indicates if a build is required before running the command

type Mode

type Mode int

Mode is used to define the mode in which we run (init or new)

const (
	// InitProject initializes a project in an existing directory
	InitProject Mode = iota + 1

	// NewProject creates a new project in the given path
	NewProject
)

func (Mode) String

func (c Mode) String() string

String translates the creator mode to a string

Jump to

Keyboard shortcuts

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