util

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CommentChar represents that the line is the comment line.
	CommentChar = "#"
	// EqualsChar represents that the equals symbol.
	EqualsChar = "="
)

Variables

This section is empty.

Functions

func ConvertToInt

func ConvertToInt(number string) int

ConvertToInt converts given string to int.

func ConvertToUint

func ConvertToUint(number string) uint

ConvertToUint converts given string to uint.

func IsNumeric

func IsNumeric(number string) bool

IsNumeric judges whether given string is numeric or not.

func ReadPropertiesFile added in v1.5.6

func ReadPropertiesFile(fs embed.FS, fileName string) map[string]string

ReadPropertiesFile reads a properties file and it returns a map has the keys and values in the file.

Types

type RequestBuilder added in v1.5.3

type RequestBuilder interface {
	URL(url string) RequestBuilder
	PathParams(value string) RequestBuilder
	RequestParams(name string, value string) RequestBuilder
	Build() RequestURL
}

RequestBuilder builds request URL.

func NewRequestBuilder added in v1.5.3

func NewRequestBuilder() RequestBuilder

NewRequestBuilder is constructor.

type RequestURL added in v1.5.3

type RequestURL interface {
	GetRequestURL() string
}

RequestURL is the element to compose request url.

Jump to

Keyboard shortcuts

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