helpers

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2017 License: MPL-2.0 Imports: 1 Imported by: 0

README

go-helpers

A collection of little GOLANG helper functions

Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanStringSlice

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

CleanStringSlice takes an input and will attempt to "clean" the input by removing "empty" or "whitespace-only" values. You will always get a []string response, even if you pass in a nil

func CombineStringSlices

func CombineStringSlices(ins ...[]string) (out []string, delta int)

CombineStringSlices takes 1..* string arrays and combines them into a single slice. This will also unique and strip "empty" values out, so y'know...there you go.

func RemoveStringsFromSlice

func RemoveStringsFromSlice(root, remove []string) (out []string, delta int)

RemoveStringsFromSlice will attempt to remove values present in "remove" from "root"

func UniqueStringSlice

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

UniqueStringSlice takes a string array and returns a slice with duplicates removed This also strips "empty" values out. You will always get a []string response, even if you pass in a nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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