Help us shape the future of Go! Take the 2026 Go Developer Survey

scaffold

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package scaffold creates a new project: the smallest set of files that compiles cleanly and shows an agent where everything goes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(dir string) ([]string, error)

Create writes a new project into dir, creating it when absent. It writes nothing when any target file already exists, and returns the created paths relative to dir.

func IsStarterPage added in v0.0.2

func IsStarterPage(template []byte) bool

IsStarterPage reports whether template is still the page lfm init wrote, ignoring line endings and surrounding whitespace.

func Placeholders added in v0.0.2

func Placeholders() (texts []string, images [][32]byte)

Placeholders are the starter texts and image of lfm init that a finished page must have replaced: the description, the social image alt text and the social image itself.

func Slug

func Slug(name string) string

Slug turns a directory name into a URL path segment of lowercase ASCII letters, digits and single hyphens. Accents are dropped: "Café" → "cafe".

func Title

func Title(name string) string

Title turns a directory name into a page title: "my-tea-shop" → "My tea shop".

Types

This section is empty.

Jump to

Keyboard shortcuts

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