Skip to content

Pearlzju/go-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Utils

Many useful golang tools

License: MIT Commitizen friendly Go Report Card GoDoc Build Status codecov

Install:

go get github.com/Laisky/go-utils

Usage

import (
    "github.com/Laisky/go-utils"
)

There are small tools including:

  • Clock: high performance lazy load clock
  • Settings: configuration manager that support yml and spring-cloud-config-server
  • Counter: counter and rotate counter
  • Mail: simply email sender
  • encrypt.go:
    • JWT: simply JWT encrypt/decrypt functions
    • GeneratePasswordHash: generate hashed password
    • ValidatePasswordHash: validate hashed password
  • RequestJSON: simply http client that send json request and unmarshal response by json
  • Logger: high performance structrued logger based by zap
  • Math: some simply math functions
    • Round: get round of float
  • Throttle: throttling to limit throughput
  • time: some useful time functions
    • UTCNow()
    • ParseTs2String
    • ParseTs2Time
  • utils: some tool functions
    • GetFuncName
    • FallBack
    • RegexNamedSubMatch
    • FlattenMap

see more examples in tests or document

About

golang utils

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.5%
  • Other 0.5%