daisy

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package daisy is an example flower that copies, expanding the template, one file at install time and one file at configure time.

Index

Constants

View Source
const (
	InstallPlainFileSrc = "embedded/inst1.txt"
	InstallTmplFileSrc  = "embedded/inst2.txt.tmpl"
	ConfigTmplFileSrc   = "embedded/config1.txt.tmpl"
)

Input paths in the source fs.

View Source
const (
	InstallPlainFileDst = "inst1.txt"
	InstallTmplFileDst  = "inst2.txt"
	ConfigTmplFileDst   = "config1.txt"
)

Output paths in the destination fs, relative to the customizable Flower.DstDir.

View Source
const Name = "daisy"

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Environment string // dynamic setting
	GossipKey   string // Secret
}

type Flower

type Flower struct {
	Inst
	Conf
}

func (*Flower) Configure

func (fl *Flower) Configure() error

func (*Flower) Description

func (fl *Flower) Description() string

func (*Flower) Embedded

func (fl *Flower) Embedded() []string

func (*Flower) Init

func (fl *Flower) Init() error

func (*Flower) Install

func (fl *Flower) Install() error

func (*Flower) String

func (fl *Flower) String() string

type Inst

type Inst struct {
	// Base directory into which all files will be installed.
	DstDir     string `default:"/tmp/daisy"`
	PetalColor string `default:"white"`
	Perennial  bool   `default:"true"`
	Fsys       fs.FS
}

Jump to

Keyboard shortcuts

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