list

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 2 Imported by: ? 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 list implements creation of lists (old tablelist).

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyArray        = errors.New("empty array")
	ErrNilElementInArray = errors.New("nil element in array")
)

Functions

func Build

func Build[T Listable](arr []T) ([]core.Row, error)

Build is responsible to receive a collection of objects that implements Listable and build the rows of TableList. This method should be used in case of a collection of values.

func BuildFromPointer

func BuildFromPointer[T Listable](arr []*T) ([]core.Row, error)

BuildFromPointer is responsible to receive a collection of objects that implements Listable and build the rows of TableList. This method should be used in case of a collection of pointers.

Types

type Listable

type Listable interface {
	GetHeader() core.Row
	GetContent(i int) core.Row
}

Listable is the main abstraction of a listable item in a TableList. A collection of objects that implements this interface may be added in a list.

Jump to

Keyboard shortcuts

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