util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DerefBool

func DerefBool(s *bool, defaultValue ...bool) bool

DerefBool converts a bool reference into a bool value. If the reference is nil, the default value is returned instead

func DerefString

func DerefString(s *string, defaultValue ...string) string

DerefString converts a string reference into a string value. If the reference is nil, the default value is returned instead

func RefBool

func RefBool(b bool, defaultValue ...bool) *bool

RefBool converts a bool value into a bool reference. The reference can also take a nil value to indicate a default value

func RefString

func RefString(s string, defaultValue ...string) *string

RefString converts a string value into a string reference. The reference can also take a nil value to indicate a default value

func StringInSlice

func StringInSlice(s string, slice []string) bool

StringInSlice verifies if a string slice contains a string value

Types

This section is empty.

Jump to

Keyboard shortcuts

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