This repository was archived by the owner on Apr 1, 2023. It is now read-only.
Releases: xgfone/go-tools
Releases · xgfone/go-tools
v5.1.0
- Change
Option
fromstruct
tointerface
. - 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
andFloat64Option
.
v5.0.0
- Remove the sub-package
nets/http2
, and please to use the librarygithub.com/xgfone/ship
. - Optimize the io read function
ReadN
andReadNWriter
. - The converting functions, like
ToXXX
, supportnil
to parse as ZERO. AndToString
supports the types oferror
,time.Time
andfmt.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 implementOption
similar toOption
in Rust. - Add the converting functions
ToDuration
andMustToTime
. - Add the converter and its the global calling interface
Convert()
. - Add some tests.
v4.0.0
v3.2.0
- Allow
NewBufferPool
to set the buffer size. - Add the default signal sets
DefaultSignals
, andHandleSignal
will useDefaultSignals
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 deprecateListenAndServeTLS()
. - Fix: correct the replacement
~
and$HOME
inAbs()
. - Fix: add the lock for
SizedRotatingFile.DisableBuffer()
.
v3.1.0
v3.0.0
- 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 removeContext
. - For sub-package
tags
, use the typeTag
instead of*Tag
. - Fix some bugs.
v2.7.0
v2.6.0
v2.5.0
GetBody
supports*http.Request
and*http.Response
, and does not read the body whenContentLength
is equal to 0.- Add the function
DiscardBody
in the packagehttp2
. - Add the function
NameToType
in the packagetypes
. - Add the method
Flush
forWriteCloser
andSizedRotatingFile
in the packagehandler
. - Fix a bug: the string type of
map[string]string
isstring2string
, notstring2string,
.
v2.4.0
- Add some methods for
http2.Context
. - Add http Error render function.
- Add the HTTP handler wrapper
ErrorWrapper
andErrorWrapperFunc
. - Add some HTTP header get function GetQueryXxx, such as
GetQueryInt
,GetQueryIntDefault
, etc. - Add the sort function for
[]int
,[]uint
, and[]int64
.