decode

package
v0.0.0-...-8018142 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MPL-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

decode

GoDoc

Documentation

Overview

Package decode contains helper functions for turning mapstructure interfaces into simpler structs for configs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSlice

func ToSlice(raw interface{}) []interface{}

ToSlice converts an interface{} to a slice of interfaces{}

func ToStrings

func ToStrings(raw interface{}) ([]string, error)

ToStrings converts the given interface{} to a []string, or returns an error. In the case where the argument is a string already, will wrap the arg in a slice.

func ToStruct

func ToStruct(raw interface{}, result interface{}) error

ToStruct decodes a raw interface{} into the target struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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