util

package
v0.1.2-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package util contains general helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference(list []string, set map[string]struct{}) []string

Difference returns the elements in list that are not in set.

func Intersection

func Intersection(list []string, set map[string]struct{}) []string

Intersection returns the elements in list that are in set.

func ListKeys

func ListKeys[T any](m map[string]T) []string

func MinInt added in v0.1.2

func MinInt(nums []int) int

MinInt returns the minimum value in nums. If nums is empty, it returns 0.

func ToSet

func ToSet(list []string) map[string]struct{}

ToSet converts a list to a set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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