scaffold

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package scaffold sets a service up for SPECTRE by rendering a template from a template repository into the spectre directory of its checkout with scaffolder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, config Config) error

Init renders the template into the spectre directory of config.Dir, which must not exist yet.

Types

type Config

type Config struct {
	// Dir is the service checkout to set up.
	Dir string `` /* 137-byte string literal not displayed */
	// Template names the template to render.
	Template string `required:"" placeholder:"NAME" help:"Template to render, a directory at the root of the template repository."`
	// Repo holds the templates, one directory each.
	Repo string `` /* 170-byte string literal not displayed */
	// Vars are the template's variables.
	Vars map[string]string `name:"var" mapsep:"none" placeholder:"NAME=VALUE" help:"Set a template variable. Write a list comma-separated."`
}

Config selects the template init renders and its variables.

Jump to

Keyboard shortcuts

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