utils

package
v0.0.0-...-d996d1d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package utils is a set of utilities for the console server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMapValues

func ConvertMapValues[K comparable, T any, G any](input map[K]T, f func(x T) G) map[K]G

func FlatMap

func FlatMap[T any, G any](slice []T, f func(x T) []G) []G

func FromCivilDate

func FromCivilDate(civilDate civil.Date) *fleetconsolerpc.DateOnly

func InvalidFilterError

func InvalidFilterError(err error) error

func InvalidOrderByError

func InvalidOrderByError(err error) error

func InvalidTokenError

func InvalidTokenError(err error) error

func Map

func Map[T any, G any](slice []T, f func(x T) G) []G

func NewDateOnly

func NewDateOnly(year int32, month int32, day int32) *fleetconsolerpc.DateOnly

Types

type Set

type Set[T comparable] map[T]empty

func (Set[T]) Add

func (s Set[T]) Add(item T)

func (Set[T]) Contains

func (s Set[T]) Contains(item T) bool

func (Set[T]) Remove

func (s Set[T]) Remove(item T)

Jump to

Keyboard shortcuts

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