Duke Git Lancet Versions Save

A comprehensive, efficient, and reusable util function library of Go.

v2.3.0

2 months ago

Feature:

  1. convertor package: add ToStdBase64, ToUrlBase64, ToRawStdBase64, ToRawUrlBase64 functions.
  2. datastructure package: add Optional datastructure, add Reset and refact itertor logic. add FilterByValue for HashMap.
  3. function package: add predicate function logic (Or, And, Nor...), add AcceptIf function.
  4. fileutil package: add CopyDir, ParallelChunkRead functions.
  5. mathutil package: add CeilToFloat,CeilToString,FloorToFloat,FloorToString functions.
  6. strutil package: add SubInBetween, HammingDistance functions.
  7. slice package: add SetToDefaultIf functions.

Fix:

  1. maputil package: fix bug of MapTo(issue #169).
  2. strutil package: fix bug of After and Before function(issue #168).
  3. random package: fix MAXIMUM_CAPACITY bug (issue #166)

Break Change:

  1. retry package: Add retry backoff policy.
  2. datastructure pacakge: rename constructor of Set (NewSet->New, NewSetFromSlice->FromSlice),add ToSlice function for Set.
  3. mathutil package: refact RoundToFloat, TruncRound, TruncRound.

Thanks @donutloop, @cannian1 , @coloraven to contribute high quality code!

v1.4.3

2 months ago

Feature:

  1. convertor package: add MapToStruct,ToStdBase64, ToUrlBase64, ToRawStdBase64, ToRawUrlBase64 functions.
  2. fileutil package: add WriteMapsToCsv, CopyDir, ChunkRead, ParallelChunkRead functions.
  3. mathutil package: add CeilToFloat,CeilToString,FloorToFloat,FloorToString functions
  4. strutil package: add SubInBetween, HammingDistance functions.

Fix:

  1. strutil package: fix bug of After and Before function(issue #168).

v2.2.9

3 months ago

Feature:

  1. fileutil package: add WriteMapsToCsv function. Support delimiter param in ReadCsvFile and WriteCsvFile.
  2. slice package: add DeleteAt and add DeleteRange function.

Fix:

  1. math package: fix bug of Cos function.
  2. structs package: fix bug of ToMap function.

Refactor:

  1. random package: improve the performance of random function.

v2.2.8

4 months ago

Feature:

  1. random package: add RandFloat, RandFloats, RandSymbolChar.
  2. netutil package: http sendRequest support context param.
  3. slice package: add Random function to get a random item from slice.

Fix:

  1. validator package: fix IsChineseIdNum bug.
  2. datetime package: fix IsLeapYear bug.

v2.2.7

6 months ago

Feature:

  1. cryptor package: add GenerateRsaKeyPair, RsaEncryptOAEP, RsaDecryptOAEP.
  2. fileutil package: add ReadFile from path or url.
  3. strutil package: add IsNotBlank.
  4. datastructure package: ArrayQueue support auto scale.

Fix:

  1. fileutil package: fix CurrentPath to support windows and linux.

v1.4.2

6 months ago

Feature:

  1. cryptor package: add GenerateRsaKeyPair, RsaEncryptOAEP, RsaDecryptOAEP.
  2. fileutil package: add ReadFile from path or url.
  3. validator package: add IsBin, IsHex, IsBase64URL, IsJWT, IsVisa, IsMasterCard, IsAmericanExpress, IsUnionPay, IsChinaUnionPay.

v2.2.6

7 months ago

Feature:

  1. validator package: add IsBin, IsHex, IsBase64URL, IsJWT, IsVisa, IsMasterCard, IsAmericanExpress. Is

  2. slice package: add Partition.

Fix:

  1. convertor package: fix the bug in cloning slices.

v2.2.5

8 months ago

Feature:

  1. datastructure package: add CopyOnWriteList, a thread-safe list implementation.
  2. compare package: add InDelta.

Fix:

  1. fileutil package: Fix bug of Zip folder.

v2.2.4

9 months ago

Feature:

  1. cryptor package: add base64 support for md5, hmac, sha encrypt functions.
  2. datetime package: add NowDateOrTime, Timestamp, TimestampMilli, TimestampMicro, TimestampNano.
  3. maputil package: add ConcurrentMap, HasKey.
  4. slice package: add Join.
  5. pointer package: add UnwarpOr, UnwarpOrDefault.

Fix:

  1. fileutil package: Fix bug of CreateDir.

v1.4.1

9 months ago

Feature:

  1. cryptor package: add base64 support for md5, hmac, sha encrypt functions.
  2. datetime package: add NowDateOrTime, Timestamp, TimestampMilli, TimestampMicro, TimestampNano.
  3. maputil package: add HasKey.
  4. slice package: add Join.

Fix:

  1. fileutil package: Fix bug of CreateDir.