mdocinfo

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: BSD-2-Clause Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mdocinfo reads the descriptive fields of an mdoc data schema (the JSON Schema documents found in data-schemas/mdoc/ of rulebook catalogs).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Title is the schema's top-level "title".
	Title string
	// Description is the schema's top-level "description".
	Description string
	// DocType is the mdoc document type. It is read from a top-level
	// "docType" string, from "properties.docType.const", or from the first
	// "docType" property that declares a "const" anywhere in the document
	// (WE BUILD schemas nest it under "$defs"/"oneOf" branches). Empty when
	// the file declares none.
	DocType string
}

Info holds the descriptive fields of an mdoc data schema.

func Parse

func Parse(data []byte) (Info, error)

Parse extracts Info from an mdoc data schema. It returns an error when data is not a JSON object.

Jump to

Keyboard shortcuts

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