Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

Releases: xgfone/go-tools

v5.1.0

03 Mar 13:16
Compare
Choose a tag to compare
  • Change Option from struct to interface.
  • Add the new method for Option: Scan, ConvertTo, Float32, Float64.
  • Add typed Option, such as BoolOption, StringOption, IntOption, Int8Option, Int16Option, Int32Option, Int64Option, UintOption, Uint8Option, Uint16Option, Uint32Option, Uint64Option and Float64Option.

v5.0.0

27 Feb 03:56
Compare
Choose a tag to compare
  • Remove the sub-package nets/http2, and please to use the library github.com/xgfone/ship.
  • Optimize the io read function ReadN and ReadNWriter.
  • The converting functions, like ToXXX, support nil to parse as ZERO. And ToString supports the types of error, time.Time and fmt.Stringer.
  • Add some spliting functions similar to split in python: SplitSpace, SplitSpaceN, SplitString, SplitStringN, Split, SplitN.
  • Add the sub-package errors to the parent-children relationship of the error.
  • Add the sub-package option to implement Option similar to Option in Rust.
  • Add the converting functions ToDuration and MustToTime.
  • Add the converter and its the global calling interface Convert().
  • Add some tests.

v4.0.0

30 Oct 02:04
Compare
Choose a tag to compare
  • Remove useless codes and trim the package.
  • Add some new functions, such as 'Deque'.
  • Update(maybe change) some function.

v3.2.0

05 Jul 06:54
Compare
Choose a tag to compare
  • Allow NewBufferPool to set the buffer size.
  • Add the default signal sets DefaultSignals, and HandleSignal will use DefaultSignals if not appointing the signals.
  • Add the function ReadNWriter.
  • Add the function GeneralDecoder.
  • Add the function CheckError.
  • Add the functions RangeStop, RangeStepOne, Ranges.
  • Add some global default buffer pool and bytes pools.
  • Add CA arguments for ListenAndServe() and deprecate ListenAndServeTLS().
  • Fix: correct the replacement ~ and $HOME in Abs().
  • Fix: add the lock for SizedRotatingFile.DisableBuffer().

v3.1.0

06 Jun 07:33
Compare
Choose a tag to compare
  • Add the method DisableBuffer() for SizedRotatingFile.
  • Never call lifecycle.Stop() in ListenAndServeXXX().

v3.0.0

05 Jun 08:16
Compare
Choose a tag to compare
  • Add the Set type.
  • Add some functions, such as IsIP(), GetInterfaceByIP(), etc.
  • Remove some functions, such as SplitXXX() about strings, HTTP handler wrapper.
  • Remove the TCP/UDP server and the Handle interface.
  • Remove the logging handler TimedRotatingFile.
  • Remove the sub-package pagination, log2.
  • Re-implement the sub-package execution.
  • Rearrange the sub-package net2/http2 and remove Context.
  • For sub-package tags, use the type Tag instead of *Tag.
  • Fix some bugs.

v2.7.0

16 May 06:32
Compare
Choose a tag to compare
  • Add the function AbsInt64.
  • Add the function ReadN.
  • Add the pool type, BytesPool and BufferPool.
  • ToBool supports on, On, ON, off, Off and OFF.

v2.6.0

20 Jan 08:16
Compare
Choose a tag to compare
  • Parse on/On/ON/off/Off/OFF as the string bool value.
  • Add the method ReOpen for SizedRotatingFile.
  • Deprecate TimeRotatingFile.
  • Add the function IsNil to judge the nil value.
  • Fix some bugs.

v2.5.0

08 Jan 14:24
Compare
Choose a tag to compare
  • GetBody supports *http.Request and *http.Response, and does not read the body when ContentLength is equal to 0.
  • Add the function DiscardBody in the package http2.
  • Add the function NameToType in the package types.
  • Add the method Flush for WriteCloser and SizedRotatingFile in the package handler.
  • Fix a bug: the string type of map[string]string is string2string, not string2string,.

v2.4.0

13 Dec 14:50
Compare
Choose a tag to compare
  • Add some methods for http2.Context.
  • Add http Error render function.
  • Add the HTTP handler wrapper ErrorWrapper and ErrorWrapperFunc.
  • Add some HTTP header get function GetQueryXxx, such as GetQueryInt, GetQueryIntDefault, etc.
  • Add the sort function for []int, []uint, and []int64.