utils

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 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 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