projectgen

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package projectgen renders starter project scaffolds from embedded templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name             string
	Description      string
	GitLocation      string
	ProjectDirPrefix string
	RootPath         string
	InPlace          bool
}

Config defines the inputs used to generate a new project scaffold.

type Generator

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

Generator renders embedded project templates and runs post-generation steps.

func New

func New(log zerolog.Logger) *Generator

New constructs a generator with the embedded template filesystem.

func (*Generator) AddPostStep

func (g *Generator) AddPostStep(step poststep.PostStep)

AddPostStep appends a post-generation step to be run after rendering completes.

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, cfg Config) (string, error)

Generate renders the scaffold into the target directory and runs post steps.

func (*Generator) GenerateResult added in v0.2.5

func (g *Generator) GenerateResult(ctx context.Context, cfg Config) (Result, error)

GenerateResult renders the scaffold and returns detailed generation metadata.

type Result added in v0.2.5

type Result struct {
	TargetPath string
	ModulePath string
}

Result describes a completed project generation run.

Jump to

Keyboard shortcuts

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