util

package
v0.0.0-...-c30d74c Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateNextStep

func CalculateNextStep(lastTime, currentTime time.Time, step, minStep int64) int64

CalculateNextStep calculates the next step based on the lastTime, currentTime, step, and minStep. It returns the calculated next step value.

func ConvertFromBase62

func ConvertFromBase62(str string) int64

func ConvertToBase62

func ConvertToBase62(num int64) string

ConvertToBase62 converts a given number to its base 62 representation.

func ExtractGoPath

func ExtractGoPath(str string) string

ExtractGoPath extracts the Go path from the given string. It takes a string parameter and returns a string.

func GenerateIDs

func GenerateIDs(start, end int64, skipList []int64) []int64

GenerateIDs generates a list of IDs between start and end, excluding those in the skipList.

func IsValidBase62String

func IsValidBase62String(str string) bool

func IsValidURL

func IsValidURL(str string) bool

IsValidURL checks if a string is a valid http(s) address. Returns true if the string is a valid URL, otherwise false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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