author

package
v6.3.3 Latest Latest
Warning

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

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

Documentation

Overview

Package author scaffolds standalone projects from explicitly published workload files.

Index

Constants

View Source
const (
	SDK = "github.com/stroppy-io/stroppy/v6"
)

Variables

View Source
var (
	ErrSourceUnavailable = errors.New("author did not publish source")
	ErrInvalidSource     = errors.New("invalid published source")
)
View Source
var ErrDestination = errors.New("destination must be a new or empty real directory")

Functions

func Builtin

func Builtin(source fs.FS, origin, descriptor string) fs.FS

Builtin publishes owned source with imports relative to the restored project.

func Descriptor

func Descriptor(files map[string][]byte, name string) (string, error)

Descriptor finds the exported Test descriptor matching a workload's registered name.

func ModuleName

func ModuleName(name string) string

func Project

func Project(
	name, modulePath, version string, published map[string][]byte, sourcePackage ...string,
) (map[string][]byte, error)

Project creates root main/module files and restores package-relative publication.

func Read

func Read(source fs.FS) (map[string][]byte, error)

Read validates and copies only explicitly published regular files.

func Starter

func Starter(name string, sourcePackage ...string) map[string][]byte

func Write

func Write(destination string, files map[string][]byte) (returnErr error)

Write creates files exclusively beneath an opened destination directory. Rollback removes only unchanged files created by this operation.

Types

This section is empty.

Directories

Path Synopsis
Command generate refreshes explicitly published builtin source support files.
Command generate refreshes explicitly published builtin source support files.

Jump to

Keyboard shortcuts

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