utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v0.2.0

func Contains[T comparable](s []T, e T) bool

func Filter

func Filter[T any](ss []T, test func(T) bool) (ret []T)

func GetAsJson

func GetAsJson[T any](item T) string

func Map added in v0.2.0

func Map[T any, R any](ss []T, transform func(T) R) (ret []R)

func Print

func Print[T any](outputFormat string, items []T, namePath string, columnHeaders []string, columnPaths []string)

func PrintColumns

func PrintColumns[T any](items []T, columnHeaders []string, columnPaths []string)

func PrintJson

func PrintJson[T any](items []T)

func PrintNames

func PrintNames[T any](items []T, namePath string)

func PrintYaml

func PrintYaml[T any](items []T)

func Printf

func Printf(w io.Writer, format string, a ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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