Documentation
¶
Index ¶
- func CompareVersions(v1, v2 string) (int, error)
- func DownloadFile(filepath string, url string) error
- func Duration(d time.Duration) string
- func IsModernPoE(version string) (bool, error)
- func Number(n int64) string
- func ParseGameVersion(version string) (int, error)
- func Rate(rate float64) string
- func ToSnakeCase(s string) string
- type Progress
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
CompareVersions compares two version strings Returns -1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2
func DownloadFile ¶
DownloadFile downloads a file from the given URL to the specified filepath
func Duration ¶
Duration formats time duration in human-readable form. Examples:
- Less than 1 second: "0s"
- Less than 1 minute: "5.2s"
- Less than 1 hour: "3m5.2s"
- 1 hour or more: "2h15m"
func IsModernPoE ¶
IsModernPoE checks if the version uses modern hash algorithm (≥3.21.2)
func Number ¶
Number formats large numbers with commas for readability. For example: 1234567 becomes "1,234,567"
func ParseGameVersion ¶
ParseGameVersion parses a game version string and returns the major version number
Types ¶
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress represents a progress bar using mpb
func NewProgress ¶
NewProgress creates a new progress bar with the given total count
func (*Progress) Finish ¶
func (p *Progress) Finish()
Finish completes the progress bar and shuts down the container
func (*Progress) SetEnabled ¶
SetEnabled allows manually enabling/disabling the progress bar
type VersionInfo ¶
VersionInfo represents parsed version components
func ParseVersionInfo ¶
func ParseVersionInfo(version string) (*VersionInfo, error)
ParseVersionInfo parses a full version string (e.g., "3.21.2.1") into components