util

package
v0.14.46-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2018 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(network, host string) string

Address constructs a URL from the given network and hostname.

func CopyMatchingTag added in v0.14.42

func CopyMatchingTag(from interface{}, to interface{}, tag string, shouldCopy func(value string) bool)

CopyMatchingTag copies fields tagged tag:"value" from "from" struct onto "to" struct.

func FillNilSlices

func FillNilSlices(data interface{}) error

FillNilSlices sets default value on slices that are still nil.

func SetDefaults

func SetDefaults(data interface{}) error

SetDefaults sets default values on a struct, based on the default annotation.

func UniqueStrings

func UniqueStrings(ss []string) []string

UniqueStrings returns a list on unique strings, trimming and sorting them at the same time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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