scaffold

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplatesFS embed.FS

TemplatesFS contains embedded project scaffolding templates

Functions

func CreateProject

func CreateProject(projectPath string, data ProjectData) error

CreateProject scaffolds a new Forge project at the given path

func GetGoVersion

func GetGoVersion() string

GetGoVersion returns the current Go version (e.g., "1.23")

func InferModule

func InferModule(projectName string) string

InferModule returns the project name as the Go module path. A bare project name (e.g., "myapp") is a valid Go module path and is the correct default for a new project. Users can update go.mod manually if they want a full github.com/user/project path after creating their repository.

Types

type ProjectData

type ProjectData struct {
	Name                 string
	Module               string
	GoVersion            string
	ExampleResource      string // lowercase (e.g., "product")
	ExampleResourceTitle string // titlecase (e.g., "Product")
}

ProjectData holds template variables for project scaffolding

Jump to

Keyboard shortcuts

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