scaffold

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package scaffold creates a new project on the platform.

Only the domain part is written by hand in the created project: the entry point and the wiring function. Module wiring, settings and the environment example are generated.

Index

Constants

View Source
const PlatformModule = "github.com/aidarbn/platform-go"

PlatformModule is the Go module path of the platform.

Variables

This section is empty.

Functions

func New

func New(o Options) ([]string, error)

New creates the project and returns the list of created files.

Types

type Options

type Options struct {
	Dir       string   // project directory
	Module    string   // Go module path, for example github.com/me/shop-api
	Service   string   // service name; defaults to the last element of the module path
	Modules   []string // platform modules to enable
	GoVersion string   // Go version for go.mod
	Require   string   // platform version in go.mod
	Replace   string   // path to the platform for a replace directive: development and tests
}

Options describes the new project.

Jump to

Keyboard shortcuts

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