kind

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 2 Imported by: 0 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 kind names the kinds of value an action returns, as an expression reads them once the runner has received them, so that probe check can tell what an expression does with a field before the workflow runs.

Index

Constants

View Source
const (
	Number = "number"
	String = "string"
	Bool   = "bool"
	Map    = "map"
	List   = "list"
)

The kinds of value, as they are named where a kind is given as text, as probe.CheckOptions takes them. A whole number and one with a fraction are both a number: an action sends its numbers as one kind, and the runner receives those that are whole as integers. Any other name, the empty one included, is of a value that may be of any kind.

Variables

This section is empty.

Functions

func Fields

func Fields(v any) map[string]string

Fields returns the kinds of the fields of v, a struct or a pointer to one, by the names their map tags give, as an action that returns the struct sends them: a number for a field of a number type, a string for one of string, []byte, time.Duration or time.Time, which are sent as text, a bool for one of bool, a list for a slice or an array, and a map for a map or a struct. A field of an interface type, which may hold anything, is left out, as is a field without a tag.

func Of

func Of(v any) (string, bool)

Of returns the kind of v, a value as the runner receives it from an action: a number, a string, a bool, a map keyed by strings or a list. It returns false for nil, which is of no kind, and for a value of any other type.

func OfType

func OfType(t reflect.Type) (string, bool)

OfType returns the kind a value of t is sent as, as Fields tells it, and false for a type whose values may be of any kind, as an interface's are.

Types

This section is empty.

Jump to

Keyboard shortcuts

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