stringformat

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfKeysNonEmpty

func CheckIfKeysNonEmpty(s1 string, s2 string) bool

CheckIfKeysNonEmpty to check if both strings are non-empty

func CheckValidRange

func CheckValidRange(val int64, min int64, max int64) bool

CheckValidRange to check if an integer value is within a specified range.

func FixedLengthString

func FixedLengthString(length int, value interface{}, alignment AlignmentType) string

FixedLengthString to convert the given string into fixed length by truncating or padding.

func StringLookup

func StringLookup(input interface{}, value string) bool

StringLookup to check if a value exists in the given input

func StringsLookup

func StringsLookup(refList []string, inputList []string) bool

StringsLookup returns true if all the items in the inputList exists in the refList, else returns false

Types

type AlignmentType

type AlignmentType int

AlignmentType for formatted output

const (
	// LeftAlign to left-justify text
	LeftAlign AlignmentType = 1 + iota
	// RightAlign to right-justify text
	RightAlign
	// CenterAlign to align the text to the center
	CenterAlign
)

Jump to

Keyboard shortcuts

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