statusviewtest

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package statusviewtest fills a status record for the tests that hold a details view to printing all of it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line struct {
	// Path is the field's place in the record, as Go names it.
	Path string
	// Text is "Label: value", the label and value as statusview.WriteFields
	// prints them.
	Text string
}

Line is one field a filled record holds and the line a details view has to print for it.

func Fill

func Fill(record any, skip ...string) []Line

Fill sets every field the record pointed to holds, at every depth, to a value no other field has: a list gets one item and a map one entry. It returns the line each field has to be printed as. Fields named in skip, by their Go name at any depth, are left as they are.

A field the API gains is filled too, so a test over Fill fails until a details view prints it.

Jump to

Keyboard shortcuts

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