collection

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveBlanks added in v0.19.0

func RemoveBlanks(data interface{})

RemoveBlanks goes through the data, assumed to be an array or map of some kind, and removes any data that is a nil or zero value. Maps with no keys are also removed.

Note that this will not check the data again. So if you have the following

parent: {
  child: {}
}

The result will be parent: {}

it will not go through it again and remove parent.

func RepeatSymbol

func RepeatSymbol(count int, symbol, separator string) string

RepeatSymbol returns symbol <count> times, with <separator> between each one. if symbol = ?, separator = , and count = 5 this returns: "?,?,?,?,?"

Types

This section is empty.

Jump to

Keyboard shortcuts

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