utils

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAdaptorEndpointFromFlags

func GetAdaptorEndpointFromFlags(cmd *cobra.Command) (string, error)

GetAdaptorEndpointFromFlags gets the value of --adaptor-api or returns an error in case it is not valid.

func GetDebugModeFromFlags

func GetDebugModeFromFlags(cmd *cobra.Command) bool

GetDebugModeFromFlags gets the value of --debug flag

func GetMetadataKeysFromCmdFlags

func GetMetadataKeysFromCmdFlags(cmd *cobra.Command) ([]string, error)

GetMetadataKeysFromCmdFlags returns the keys from --metadata-keys flag

func MapContainsKeys

func MapContainsKeys(subject map[string]string, targets []string) bool

MapContainsKeys returns true if the subject map contains target keys

func SanitizeLocalhost

func SanitizeLocalhost(host string) (string, error)

SanitizeLocalhost changes localhost to host.docker.internal in case the project is running as a docker container.

Of course, this function won't work with values like localhostS or localhost-example.com, but that is intentionally left un-implemented as that is a very corner case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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