create

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdCreate

func NewCmdCreate() *cobra.Command

NewCmdCreate returns new initialized instance of 'create' sub command.

Types

type CreateOptions

type CreateOptions struct {
	GoVersion    string
	TemplatePath string
	RootPackage  string
	AppName      string
	AppNameCamel string

	// GitHub template
	ModuleName  string // Go module name (optional)
	TemplateRef string // Template version
	NoCache     bool   // Force re-download

	// Service selection
	All         bool     // Create all available services
	Services    []string // Explicitly specified services
	NoServices  []string // Services to exclude from defaults
	AddServices []string // Services to add to defaults
	Interactive bool     // Whether to use interactive mode (default true)

	// Git initialization
	InitGit bool // Initialize git repository (default true)

	// Build options
	Build bool // Run make build after creation (default false)
	// contains filtered or unexported fields
}

CreateOptions is an option struct to support 'create' sub command.

func NewCreateOptions

func NewCreateOptions() *CreateOptions

NewCreateOptions returns an initialized CreateOptions instance.

func (*CreateOptions) Complete

func (o *CreateOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*CreateOptions) Run

func (o *CreateOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*CreateOptions) Validate

func (o *CreateOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type ServiceMapping added in v1.5.0

type ServiceMapping struct {
	Cmd      string
	Internal string
}

ServiceMapping describes a service's directory structure

Jump to

Keyboard shortcuts

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