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

scaffold

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package scaffold generates a new C4Stack app. It only ever creates a new directory; it never writes into an existing one.

Index

Constants

View Source
const FrameworkModule = "github.com/coolapso/c4stack"

FrameworkModule is the module path apps require.

View Source
const GoVersion = "1.26.0"

GoVersion is the go directive generated apps start with.

Variables

This section is empty.

Functions

func Generate

func Generate(opts Options) error

Generate creates opts.Dir with a new app. It validates everything before creating anything, and fails if the directory exists.

func IsRelease

func IsRelease(v string) bool

IsRelease reports whether v names a release, as opposed to a pseudo-version, a pre-release or a development build.

Types

type Options

type Options struct {
	// Dir is the directory to create. It must not exist.
	Dir string
	// Name is the app's name: lowercase letters, digits and hyphens, starting with a
	// letter. It names the binary and derives the environment variable prefix.
	Name string
	// Module is the Go module path. Zero means Name.
	Module string
	// Version is the C4Stack release to pin, such as v0.1.0. It is ignored with Local.
	Version string
	// Local is the path of a C4Stack checkout to build against during development. The
	// app then gets a replace directive and includes the checkout's shared Taskfile.
	Local string
}

Options describe the app to generate.

Jump to

Keyboard shortcuts

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