convert

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package convert provides utilities for converting between different slice and map types.

This is a poor workaround until go has generics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntMapToSlice

func IntMapToSlice(m map[int]interface{}) (ret []int)

IntMapToSlice will return all the keys for the given intmap

func IntSliceToMap

func IntSliceToMap(v []int) map[int]interface{}

IntSliceToMap will return a map with keys created from the slice

func StringMapToSlice

func StringMapToSlice(m map[string]interface{}) (ret []string)

StringMapToSlice will return all the keys for the given string map

func UniqueStrings

func UniqueStrings(in []string) (out []string)

UniqueStrings will remove duplicates preserving order of the input

Types

This section is empty.

Jump to

Keyboard shortcuts

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