Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyUnmarshal ¶
func BodyUnmarshal(r io.ReadSeeker, store any) error
func ReaderFromRequest ¶ added in v0.0.2
func ReaderFromRequest(r *http.Request) (io.ReadSeeker, error)
Types ¶
type LinkedList ¶
type LinkedList[T any] struct { Head *Node[T] `json:"next"` Last *Node[T] `json:"-"` // Pointer to the last node }
LinkedList is a generic linked list
func (*LinkedList[T]) Add ¶
func (ll *LinkedList[T]) Add(value T)
Add adds a new node to the linked list
func (*LinkedList[T]) AsSlice ¶
func (ll *LinkedList[T]) AsSlice() []T
func (*LinkedList[T]) RemoveById ¶
func (ll *LinkedList[T]) RemoveById(matchFunc func(T) bool)
RemoveById removes a node from the list based on a function to match the ID
func (*LinkedList[T]) Reset ¶
func (ll *LinkedList[T]) Reset()
func (*LinkedList[T]) Traverse ¶
func (ll *LinkedList[T]) Traverse(callback func(T))
Traverse is a utility function to apply a callback function to each node
Click to show internal directories.
Click to hide internal directories.