poststep

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Package poststep defines post-generation steps run after a scaffold is written.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitCommitPostStep

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

GitCommitPostStep stages the generated scaffold and creates the initial commit.

func (GitCommitPostStep) Name

func (GitCommitPostStep) Name() string

Name returns the human-readable name of the post step.

func (GitCommitPostStep) Run

Run stages all generated files and creates the initial commit.

type GitInitPostStep

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

GitInitPostStep initializes a Git repository in the generated project.

func (GitInitPostStep) Name

func (GitInitPostStep) Name() string

Name returns the human-readable name of the post step.

func (GitInitPostStep) Run

Run initializes Git in the generated project.

type GoGetUpdatePostStep

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

GoGetUpdatePostStep updates module dependencies in the generated project.

func (GoGetUpdatePostStep) Name

func (GoGetUpdatePostStep) Name() string

Name returns the human-readable name of the post step.

func (GoGetUpdatePostStep) Run

Run executes `go get -u ./...` in the generated project.

type GoModTidyPostStep

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

GoModTidyPostStep tidies the generated project's module metadata.

func (GoModTidyPostStep) Name

func (GoModTidyPostStep) Name() string

Name returns the human-readable name of the post step.

func (GoModTidyPostStep) Run

Run executes `go mod tidy` in the generated project.

type Planner

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

Planner builds the ordered post-step plan for a generator run.

func NewPlanner

func NewPlanner(log zerolog.Logger, cfg *bcliconfig.PostStepsConfig) *Planner

NewPlanner constructs a Planner with subsystem-specific loggers.

func (*Planner) Planned

func (p *Planner) Planned() []PostStep

Planned returns the enabled post steps in execution order after applying dependencies.

type PostStep

type PostStep interface {
	Name() string
	Run(ctx context.Context, input PostStepInput) error
}

PostStep represents a single post-generation action.

func DefaultPostSteps

func DefaultPostSteps() []PostStep

DefaultPostSteps returns the default ordered post steps for a generated project.

type PostStepInput

type PostStepInput struct {
	ProjectPath string
	Name        string
	ModulePath  string
}

PostStepInput describes the generated project passed to a post step.

type StepID

type StepID string

StepID identifies a configurable post-generation step.

const (
	// StepGoGetUpdate updates generated project dependencies.
	StepGoGetUpdate StepID = "go_get_update"
	// StepGoModTidy tidies the generated project's module metadata.
	StepGoModTidy StepID = "go_mod_tidy"
	// StepGitInit initializes Git in the generated project.
	StepGitInit StepID = "git_init"
	// StepGitCommit stages and commits the generated project.
	StepGitCommit StepID = "git_commit"
)

Jump to

Keyboard shortcuts

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