utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateState

func CreateState() string

func ParseStringToMap

func ParseStringToMap(str string) map[string]string

func SafeIntConvert added in v0.0.5

func SafeIntConvert(value interface{}) int

SafeIntConvert safely converts interface{} to int Returns 0 if value is nil or cannot be converted to int

func SafeStringConvert added in v0.0.5

func SafeStringConvert(value interface{}) string

SafeStringConvert safely converts interface{} to string Returns empty string if value is nil or not a string type

Types

type UrlBuilder

type UrlBuilder struct {
	// contains filtered or unexported fields
}

func UrlBuilderFromBaseUrl

func UrlBuilderFromBaseUrl(baseUrl string) *UrlBuilder

func (*UrlBuilder) Build

func (b *UrlBuilder) Build(encode bool) string

func (*UrlBuilder) QueryParam

func (b *UrlBuilder) QueryParam(key string, value string) *UrlBuilder

Jump to

Keyboard shortcuts

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