diags

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndList

type AndList []string

A list that displays in the human readable format: "a, b and c".

func (AndList) String

func (h AndList) String() string

type BagOrdering

type BagOrdering struct {
	// Which bags `Property` belongs in.
	BagName []string
	// The name of the property
	Property string
	// contains filtered or unexported fields
}

type InvalidFieldBagFormatter

type InvalidFieldBagFormatter struct {
	ParentLabel string
	Bags        []TypeBag
	// The maximum number of fields to return. `MaxListed` <= 0 implies return all fields.
	MaxListed int
	// The degree of (edit) distance between the field typed and suggested.
	DistanceLimit int
}

A formatter for missing fields that may be valid in other places.

func (InvalidFieldBagFormatter) BagList

func (e InvalidFieldBagFormatter) BagList(field string) []BagOrdering

func (InvalidFieldBagFormatter) ExactMatching

func (e InvalidFieldBagFormatter) ExactMatching(field string) []string

The list of bags that exactly match `field`.

func (InvalidFieldBagFormatter) MessageWithDetail

func (e InvalidFieldBagFormatter) MessageWithDetail(field string) (string, string)

type NonExistantFieldFormatter

type NonExistantFieldFormatter struct {
	ParentLabel         string
	Fields              []string
	MaxElements         int
	FieldsAreProperties bool
}

A formatter for when a field or property is used that does not exist.

func (NonExistantFieldFormatter) Message

func (e NonExistantFieldFormatter) Message(field, fieldLabel string) string

Get a single line message.

func (NonExistantFieldFormatter) MessageWithDetail

func (e NonExistantFieldFormatter) MessageWithDetail(field, fieldLabel string) (string, string)

A message broken up into a top level and detail line

type OrList

type OrList []string

A list that displays in the human readable format: "a, b or c".

func (OrList) String

func (h OrList) String() string

type TypeBag

type TypeBag struct {
	Name       string
	Properties []string
}

Jump to

Keyboard shortcuts

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