creator

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 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

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

	Verbose  bool
	LogLevel string
	LogDir   string
}

Creator implements the "init" and "new" commands

func (Creator) Execute

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

Execute executes the command

func (*Creator) FixCreatorDefaults added in v1.9.7

func (creator *Creator) FixCreatorDefaults(project common.Project) error

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