stringformat

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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