util

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Combinations

func Combinations(set []int, n int) (subsets [][]int)

Combinations returns combinations of n elements for a given int array. For n < 1, it equals to All and returns all combinations. int is chosen because they can than be treated as indices

func ToMap

func ToMap(in interface{}) map[string]interface{}

ToMap uses json tags on struct fields to decide which fields to add to the returned map. inspired by https://stackoverflow.com/a/23598731/10633734

Types

This section is empty.

Jump to

Keyboard shortcuts

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