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

patternkit

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package patternkit validates declarative site-layout pattern packages. Patterns are opinionated page structures layered above themes; they must not declare identity tokens or HTTP extension endpoints.

Index

Constants

View Source
const (
	// ManifestFile is the required package descriptor.
	ManifestFile = "pattern.json"
	// KindPattern is the only accepted kind value.
	KindPattern = "pattern"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Path string `json:"path,omitempty"`
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

Issue is one validation failure.

func ValidateDir

func ValidateDir(dir string) []Issue

ValidateDir checks a pattern package directory.

func (Issue) String

func (i Issue) String() string

type Manifest

type Manifest struct {
	Kind        string            `json:"kind"`
	Slug        string            `json:"slug"`
	Version     string            `json:"version"`
	Name        map[string]string `json:"name"`
	Description map[string]string `json:"description"`
}

Manifest is the on-disk pattern.json shape.

Jump to

Keyboard shortcuts

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