dataset

package
v0.0.0-...-c429a28 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection[T any] struct {
	// contains filtered or unexported fields
}

func LoadCollectionCSV

func LoadCollectionCSV[T any](name string) (*Collection[T], error)

func (*Collection[T]) GetAll

func (s *Collection[T]) GetAll() []*T

func (*Collection[T]) Index

func (s *Collection[T]) Index(i int) *T

func (*Collection[T]) Len

func (s *Collection[T]) Len() int

type Dict

type Dict[T any, K comparable] struct {
	Collection[T]
	// contains filtered or unexported fields
}

func LoadDictCSV

func LoadDictCSV[T any, K comparable, PT keyer[K, T]](name string) (*Dict[T, K], error)

func (*Dict[T, K]) Exist

func (d *Dict[T, K]) Exist(key K) bool

func (*Dict[T, K]) Get

func (d *Dict[T, K]) Get(key K) (*T, bool)

func (*Dict[T, K]) MustExist

func (d *Dict[T, K]) MustExist(key K)

func (*Dict[T, K]) MustGet

func (d *Dict[T, K]) MustGet(key K) *T

Jump to

Keyboard shortcuts

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