utils

package
v1.31.3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmptyString

func IsEmptyString(s *string) bool

IsEmptyString checks whether a string is empty

func IsStringPtrValueEqual added in v1.17.0

func IsStringPtrValueEqual(a *string, b string) bool

IsStringPtrValueEqual checks whether the value of string pointer `a` is equal to value of string `b`.

func SetStringValue

func SetStringValue(values map[string]interface{}, key string, value *string)

SetStringValue sets an optional string value in a string map if the value is defined and not empty

func SimpleMatch added in v1.5.0

func SimpleMatch(pattern, text string) (bool, int)

SimpleMatch returns whether the given pattern matches the given text. It also returns a score indicating the match between `pattern` and `text`. The higher the score the higher the match. Only simple wildcard patterns are supposed to be passed, e.g. '*', 'tex*'.

func StringEqual

func StringEqual(a, b *string) bool

StringEqual compares to strings

func StringValue

func StringValue(s *string) string

StringValue returns an empty string (value/ptr)

Types

This section is empty.

Jump to

Keyboard shortcuts

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