initfile

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package initfile detects application frameworks and generates Containerfiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(dir string, tmpl Template, overwrite bool) ([]string, error)

Write writes template files into dir. Existing files are not overwritten unless overwrite is true.

Types

type Match

type Match struct {
	Template Template
	Reason   string
}

Match describes a template detected for a project directory.

func Detect

func Detect(dir string) ([]Match, error)

Detect returns built-in templates that match files in dir.

type Template

type Template struct {
	ID          string
	Name        string
	Description string
	Files       []TemplateFile
}

Template describes a generated packaging template.

func FindTemplate

func FindTemplate(id string) (Template, bool)

FindTemplate returns the template for id.

func Templates

func Templates() []Template

Templates returns the built-in templates available for generation.

type TemplateFile

type TemplateFile struct {
	Path   string
	Source string
}

TemplateFile describes a file generated by a template.

Jump to

Keyboard shortcuts

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