template

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package template renders the initial Markdown file used by interactive ticket creation.

The package embeds the new-ticket template and substitutes the system-owned fields that Clinban controls: ID, created timestamp, and updated timestamp. User-owned fields are left blank for the editor workflow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(now time.Time, defaultType, title string) ([]byte, error)

New renders the embedded new-ticket template for now, defaultType, and title.

The returned bytes are a complete Markdown ticket file with system-owned fields pre-filled. The title field is pre-filled with the provided title value, encoded as a YAML-safe scalar so that any string — including those containing quotes, colons, backslashes, or newlines — round-trips through ticket.Parse without corruption. Passing an empty string produces title: "". The ticket ID is not included in the template; callers are responsible for setting t.ID after parsing the returned bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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