utils

package
v0.0.0-...-8684de4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCallResults

func CheckCallResults(r *http.Response, err error) error

checks for errors and unexpected error code in the response data

func GetFirstName

func GetFirstName(sm IdToNameMap) string

returns the first value in the map

func NameForID

func NameForID(sm IdToNameMap, idOf string) string

func NameToIDTransformer

func NameToIDTransformer(sm IdToNameMap) func(name interface{}) interface{}

NameToIDTransformer returns a survey.Transformer that transform the map value into it's key todo remove the direct dependency on the survey api

func Names

func Names(sm IdToNameMap) []string

Types

type IdToNameMap

type IdToNameMap = map[string]string

helper type alias for id -> name maps

Jump to

Keyboard shortcuts

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