util

package
v1.15.1 Latest Latest
Warning

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

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

Documentation

Overview

Package util provides functions used across command line binaries for setup/exection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChoosePolicy

func ChoosePolicy(logger logr.Logger, defaultPolicy string, policyFlag string, policyFile string) string

ChoosePolicy selects an OPA policy based on the flags, or calls log.Fatal if an invalid combination is provided.

func ValidateAndAddPort added in v1.7.0

func ValidateAndAddPort(s string, port int) string

ValidateAndAddPort will take a given target address and optionally add a default port onto it if a port is missing. This will also take in account optional dial timeout suffix and make sure the returned value has that if it exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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