check

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Desc  string           `json:"desc,omitempty"`
	Match map[string]Value `json:"match"`
	Pass  map[string]Value `json:"pass,omitempty"`
	Fail  map[string]Value `json:"fail,omitempty"`
}

func (*Event) MarkPattern

func (e *Event) MarkPattern(group, pattern string, v Value)

type Events

type Events []*Event

type Failure

type Failure struct {
	Key      string `json:"key"`
	Got      any    `json:"got"`
	Expected any    `json:"expected"`
}

type Result

type Result struct {
	Type     string    `json:"type"`
	Step     string    `json:"step"`
	Index    int       `json:"index"`
	Failures []Failure `json:"failures"`
}

type S

type S struct {
	Events Events

	Steps struct {
		OK   int
		Fail int
	}
	// contains filtered or unexported fields
}

func (*S) Fail

func (s *S) Fail()

func (*S) OK

func (s *S) OK()

func (*S) Results

func (s *S) Results() []Result

func (*S) Trace

func (s *S) Trace() trace.PatternTrace

type Value

type Value struct {
	Got  any  `json:"got,omitempty"`
	Want any  `json:"want,omitempty"`
	OK   bool `json:"ok"`
}

Jump to

Keyboard shortcuts

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