Help us shape the future of Go! Take the 2026 Go Developer Survey

template

package
v0.1.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fence

type Fence struct {
	Lang        string                 `yaml:"lang" json:"lang"`
	Required    bool                   `yaml:"required,omitempty" json:"required,omitempty"`
	Repeatable  bool                   `yaml:"repeatable,omitempty" json:"repeatable,omitempty"`
	Order       int                    `yaml:"order,omitempty" json:"order,omitempty"`
	Description string                 `yaml:"description,omitempty" json:"description,omitempty"`
	Schema      map[string]interface{} `yaml:"schema,omitempty" json:"schema,omitempty"`
}

type FenceExample

type FenceExample struct {
	Lang string      `yaml:"lang" json:"lang"`
	Body interface{} `yaml:"body" json:"body"`
}

type Template

type Template struct {
	ID           string                 `yaml:"id" json:"id"`
	Name         string                 `yaml:"name" json:"name"`
	Description  string                 `yaml:"description,omitempty" json:"description,omitempty"`
	Format       string                 `yaml:"format,omitempty" json:"format,omitempty"`
	AppliesTo    []string               `yaml:"appliesTo,omitempty" json:"appliesTo,omitempty"`
	Platforms    []string               `yaml:"platforms,omitempty" json:"platforms,omitempty"`
	FormFactors  []string               `yaml:"formFactors,omitempty" json:"formFactors,omitempty"`
	Surfaces     []string               `yaml:"surfaces,omitempty" json:"surfaces,omitempty"`
	Instructions string                 `yaml:"instructions,omitempty" json:"instructions,omitempty"`
	Fences       []Fence                `yaml:"fences,omitempty" json:"fences,omitempty"`
	Schema       map[string]interface{} `yaml:"schema,omitempty" json:"schema,omitempty"`
	Examples     []TemplateExample      `yaml:"examples,omitempty" json:"examples,omitempty"`
}

func (*Template) Validate

func (t *Template) Validate() error

type TemplateExample

type TemplateExample struct {
	Title  string         `yaml:"title,omitempty" json:"title,omitempty"`
	Fences []FenceExample `yaml:"fences,omitempty" json:"fences,omitempty"`
}

Jump to

Keyboard shortcuts

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