GF(Go Frame)
https://goframe.org is a modular, high-performance, production-level development framework Go basis. Achieve a relatively complete infrastructure, including the development of common core components, such as: cache, log, file, time, queues, arrays, collections, strings, timer, command line, file lock, lock memory, object pooling, connection pooling, resource management, data validation, data encoding, file monitoring, regular tasks, database ORM, TCP / UDP component, process management / communication, concurrency-safe container and so on. And provides a series of Web services development of core components, such as: Router, Cookie, Session, Middleware , service registration, configuration management, template engine, etc., supports a warm restart, hot update, multi-domain, multi-port, multi-service, HTTPS, Rewrite and other characteristics.
GF
Rich foundation module, complete tool chain, comprehensive development documents. Open Source For nearly two years, GF
to get the recognition and support of more and more small partners, from nameless until now nobody has been widely used in micro-service, networking, enterprise-level block chain, electric business systems, banking systems and other production projects , the experienced one million, ten million test project, 2019 was the year of cloud code gitee
named the GVP
most valuable open source projects. GF
It is growing rapidly, the current iteration of the law maintained release version of 1-2 months, community activists, Welcome to the GF
family.
Finally, I wish you all a Happy New Year 2020, Year of the Rat down!
New features
- New year, new weather, a large number of documents updated the official website: https://goframe.org/index
GF
Toolchain update: https://goframe.org/toolchain/cli- Add
gf run
hot compile and run the command; - New
gf docker
Docker mirror compile command; - New
gf gen model
powerful model to automatically generate commands; gf build
Increased profile configuration commands support;- A large number of command-line tools improve their work;
- New automatic proxy settings characteristics;
- Add
- Database
ORM
of new features:- Increase
prefix
table prefix support: https://goframe.org/database/gdb/config - New
Schema
database object and improving the switching characteristics of the database: https://goframe.org/database/gdb/chaining/schema - New
WherePri
conditions methods for automatically identifying a primary key: https://goframe.org/database/gdb/chaining/select - Documentation and sample a large number of updates, features covering more than 95%;
- Increase
Improvements
container
garray
- New
New*ArrayRange
way to initialize an array to create the specified range of values. - New
Iterator*
method for array items elements callback traversal. - Improve unit testing.
- New
gvar
- Improvements
MapStrStr
,MapStrStrDeep
methods.
- Improvements
net
ghttp
- Improved HTTP client, increase automatically submit arguments
Content-Type
recognition. Request
Object additionParse
method, i.e. for the efficient conversion parameter verification objects.Request.GetPost*
All methods marked asdeprecated
a unified client parameters submission toQueryString
,Form
,Body
.- Remove
Response
when parsing the templateGet
/Post
built-in variables, newQuery
,Form
,Request
built-in variables: https://goframe.org/net/ghttp/response/template - Improvement
Response.WriteJson*
andResponse.WriteXml*
methods, increasestring
,[]byte
support for type parameters. Server
NewGetRouterArray
method for exposure and to get to the application layerServer
routing list.Server
NewUse
method, which isBindMiddlewareDefault
an alias for registered global middleware.Server
NewRouteOverWrite
configuration items used to control whether to override the automatic routing conflicts at the time of registration, off by default and prompt.Server
NewGraceful
configuration item, for controlling the characteristics of the GR on / off, turned on by default at the single service scenarios.- Improve unit testing.
- Improved HTTP client, increase automatically submit arguments
gtcp
- Improved simple protocol packets under transmission and reception function.
- The connection pooling default cache expiration time
30
in seconds amended as10
seconds. - Improve unit testing.
database
-
gdb
- New
As
data table alias method. - Improved data tables, automatic identification character field security feature added.
- New
DB
database object switching method. - New
TX
chaining transaction support method. - Improve unit testing.
os
- New
-
gcfg
- New
GetMapStrStr
method.
- New
-
gcmd
- Increase parameter parsing
strict
strict parameters, the default strict resolved, the error is returned when the specified parameter / option name does not exist.
- Increase parameter parsing
-
genv
- Improved
Remove
method supports multiple environment variables deleted.
- Improved
-
gfile
- Improved
TempDir
temporary directory acquisition method, in*nix
default under the system/tmp
directory. - New
ReadLines
,ReadByteLines
method for reading the contents of the file rows callback. - New
Copy*
method to copy files / directories, support recursion. - New
Replace*
method to replace the contents of the file directory, support recursion. - Improved
Scan*
methods to retrieve and return all files / directories under the specified directory, specify the file mode support, support for recursion. - Improve unit testing.
- Improved
-
gproc
- Improved command line to run method.
- Improved
Shell
command file retrieval logic. - The design process to improve communication between experimental.
-
gtime
- And a method of packet
Time
time stamp method objectSecond
,Millisecond
,Microsecond
,Nanosecond
marked as revoked, and addTimestamp
,TimestampMilli
,TimestampMicro
,TimestampNano
replaced. - Note that the above modifications may be older versions and compatibility issues.
- And a method of packet
-
gview
- Analytic functions, cache design improvements.
- New
encode
,decode
HTML coding / decoding function template. - New
concat
string concatenation template function. - New
dump
template function, function is similar tog.Dump
the method. - New
AutoEncode
configuration item, for transcoding outputHTML
content, commonly used to preventXSS
disabled by default. Note that this feature does not affect theinclude
built-in functions: https://goframe.org/os/gview/xss - Unit Testing perfect.
crypto
gmd5
- Increases
MustEncrypt
,MustEncryptBytes
,MustEncryptString
,MustEncryptFile
method.
- Increases
gsha1
- Increase
MustEncryptFile
method
- Increase
encoding
gbase64
- New
MustEncodeFile
,MustEncodeFileToString
,MustDecode
,MustDecodeToString
method.
- New
gjson
/gparser
- New
GetMapStrStr
method. - New
Must*
method for generating the specified data format conversion failurepanic
error, not returnederror
parameters.
- New
util
gconv
- Improved
Convert
methods increase[]int32
,[]int64
,[]uint
,[]uint32
,[]uint64
,[]float32
,[]float64
data type conversion support. - Improved
String
string conversion method support for indicator parameter. - Improved
Map*
code structure and properties Map conversion method. - New
Floats
,Float32s
,Float64s
Dui[]float32
,[]float64
type conversion method. - New
Ints
,Int32s
,Int64s
Dui[]int
,[]int32
,[]int64
type conversion method. - New
Uints
,Uint32s
,Uint64s
Dui[]uint
,[]uint32
,[]uint64
type conversion method. - Improve unit testing.
- Improved
frame
gins
- All singleton object generated when the acquisition failure
panic
error.
- All singleton object generated when the acquisition failure
Bug Fix
- Increase in common formats such as misrouted
/user//index
compatibility support. - Repair
gtcp
/gudp
interval time unit problems in data reception. - Repair
gfile
/gspath
/gfsnotify
package does not question the existence of strict judgment document. - Repair
gproc.Kill
method inwindows
blocking problems running under the system. - Repair
gstr.TrimLeftStr
/gstr.TrimRightStr
array when a string is replaced with the replacement string length less than the length of the overflow.