Hello everyone! From early fall to late winter, we’ve been working hard since the last release, and we’re bringing a loving Version of GoFrame V1.15. In addition, there are two things:
-
GoFrame
beOSC
Open source China to select2020
The annualTOP30
Open source projects:www.oschina.net/question/29…Thank you for your recognition and support! At the same timeGoFrame
Is alsoGitee GVP
Most Valuable Project. -
GoFrame
Official website ship new revision, crowded need to experience three bells, made will do me, fall in love with the framework:goframe.org. Thank youAtlassianThe sponsorship of the full product line to provide legal authorization code!
Over the years, GoFrame has grown into an enterprise-level Golang basic development framework, providing project development specifications, development tool chains, complete basic modules, rich development documentation, high code quality, and an active community. To ensure the quality of the framework, we did a lot of unit testing for each component to make sure the logic was correct (2534 test units, 9097 test assertions), and maintained high quality documentation. So far, many large/small Internet companies have used GoFrame in their production environments.
Open source is not easy, with your understanding and support, full of happiness! Thanks to all the partners involved in the project development, love you! GF, YES!
GoFrame
GF(Go Frame) is a modular, high-performance, enterprise-level Go basic development framework. Achieved relatively perfect infrastructure construction as well as the development tool chain, provides the basis of common development module, such as: cache, logs, queue, an array, collection, container, timer, the command line, memory, lock, configuration management, resource management, data validation, timing, task, database ORM, TCP/UDP communication, process management/components, etc. Router, Cookie, Session, Middleware, service registry, template engine, hot restart, hot update, domain binding, TLS/HTTPS, Rewrite, etc.
If you’re new to the Go language, you can think of GoFrame as similar to Laravel in PHP, SpringBoot in Java, or Django in Python.
The characteristics of
- Modular, loose coupling design;
- Modules rich, out of the box;
- Easy to use, easy to maintain;
- High code quality, high unit test coverage;
- Active community, Daniel humble low-key good temper;
- Detailed development documents and examples;
- Perfect local Chinese culture support;
- Designed for team and enterprise use;
Change Logs
-
ghttp
- reconstruction
HTTPClient
theGET
Request related methods that no longer act as parameters when passedBody
The parameter is submitted, but is automatically constructed asQueryString
To submit. To ensure compatibility with other servers. - The request object
Request
Added the default setting feature: - increase
Request.SetCtx
Method for custom context variables, commonly used in middleware/interceptors: - Added in template parsing
Request
Variable used to get the request parameters submitted by the client, eitherQueryString/Form
Type parameter: -
Cookie
Function improvement, how to set up withSession
The term of validity remains consistentCookie
, please refer to:Cookie#Cookie session expires - Packet route registration was added. Procedure
ALLMap
Method to batch register routes:Packet routing # Batch registration - new
CRSF
Plug-in documentation: - Other feature and detail improvements.
- reconstruction
-
gdb
- increase
Ctx
Method for asynchronyIO
Control or pass custom context information, especially link tracking information: - increase
Raw
Type, used for primitiveSQL
Statement embedding, which will be submitted directly to the underlying database driver without any processing:Write save #RawSQL statement embed,Update removes #RawSQL statement embedding - To improve the
Fields/Fields/Data
Method to increase the inputmap/struct
Automatic mapping detection and filtering of parameters and data table fields: - increase
InsertedAt/UpdatedAt/DeletedAt
Added the configuration of field namesTimeMaintainDisabled
To disable time padding and soft delete: - increase
Counter
Update feature for adding/subtracting fields:Update Removed the #Counter update feature - To improve the
ORM
Time zone processing, please refer to the section: - Other details about performance and ease of use.
- Some details have been improved.
- Refine unit testing.
- increase
-
gerror
- increase
Newf/NewSkipf
Method to create an error object: - Added support for error-error features:
- Refine unit testing.
- increase
-
gvalid
- increase
phone-loose
Loose mobile phone number verification rules, as long as meet13/14/15/16/17/18/19
At the beginning of11
Bits and numbers can be verified. - Return checksum error implemented
gerror
theCurrent() error
Interface, so it can be usedgerror.Current
Method to get the current first checksum error: - Other details are improved.
- Unit testing is perfect.
- increase
-
gvar
- increase
IsNil/IsEmpty
Method to determine whether the data isNil/empty
. - increase
IsInt/IsUint/IsFloat/IsSlice/IsMap/IsStruct
Common type determination methods. - Mark abandoned
StructDeep/StructDeep
Method, directly useStruct/Structs
Can. - Refine unit testing.
- increase
-
ghtml
- increase
SpecialCharsMapOrStruct
Method for automatic conversionmap/struct
Key/propertyHTML
Code to preventXSS
.
- increase
-
gjson
- Mark abandoned
To*
Conversion methods, such as:ToStruct
Replace withStruct
Methods. - Some details have been improved.
- Unit testing is perfect.
- Mark abandoned
-
internal
- Improve and refine
internal/empty
Null-value determination of packets. - Due to performance issuesGithub.com/gogf/gf/iss…, temporarily deleted
internal/json
Package to third party packageGithub.com/json-iterat…Is restored to the standard libraryencoding/json
. - To improve the
internal/structs
Package, as the package instruct
The conversion feature is used frequently, so third-party packages are removedGithub.com/gqcn/struct…To simplify reflection processing logic, improve performance and ease of use, improve long-term maintenance. -
internal/utils
Package increaseRemoveSymbols
Method to remove special letters from a string. To improve theEqualFoldWithoutChars
Method, remove the string in the string of the regular filter function, greatly improve the performance of the method. Don’t underestimate these two small functions, a little bit of performance improvement can improve the performance of other modules in the framework that involve complex type conversions.internal
Packages do not directly expose methods, but they affect the performance of some of the core components in the framework.
- Improve and refine
-
gcfg
- Improved singleton name configuration object acquisition, added automatic file type detection: Configuration Management – Singleton # automatic retrieval feature
- Some other details have been improved.
-
gcmd
- Improved the method of obtaining default parameters:
- increase
GetWithEnv
Method, when no specified argument exists on the command line, and from the environment variable:
-
genv
- increase
SetMap
Method to set environment variables in batches. - increase
GetWithCmd
Method, when no specified parameter exists in the environment variable, and obtain from the command line parameter:
- increase
-
gfile
- Mark abandoned
ReadByteLines
Method, addReadLinesBytes
Methods. - Adjust the
ReadLines/ReadLinesBytes
Method callback function definition, addederror
To return.
- Mark abandoned
-
glog
- Improved the rolling update function.
- Some other details have been improved.
-
gsession
- increase
SetMap
Method to set key-value pair data in batches.
- increase
-
gtimer
- Constant name improvement, unified use of large hump.
-
gview
- Add built-in template functions
map
Is used to convert the parameter tomap[string]interface{}
Type. - Add built-in template functions
maps
Is used to convert the parameter to[]map[string]interface{}
Type. - Add built-in template functions
json
Is used to convert the parameter toJSON
The value is a string. - Document Update:
- Some other details have been improved.
- Add built-in template functions
-
gconv
- Performance improvements.
- Feature improvements (a little too much detail, I really don’t want to write too much detail).
- The code is more robust.
- Unit testing is perfect.
-
gutil
- increase
Keys
Method used to getmap/struct
The key/property name constructed as an array is returned. - increase
Values
Method used to getmap/struct
The key/attribute values of the. - increase
MapToSlice
Methods, such as:{"K1": "v1", "K2": "v2"} => ["K1", "v1", "K2", "v2"]
- increase
StructToSlice
Methods, such as:{"K1": "v1", "K2": "v2"} => ["K1", "v1", "K2", "v2"]
- increase
SliceToMap
Methods, such as:["K1", "v1", "K2", "v2"] => {"K1": "v1", "K2": "v2"}
- Unit testing is perfect.
- Other details are improved.
- increase
Bug Fix
- repair
garray/gmap/gtree
theClone
Method Concurrency safety judgment problem. - Fixed when setting expired methods, however
gpool
There is no issue of automatically calling expiration methods when an element item expires. - repair
gfile.ReadLInes/ReadLineBytes
Read duplication problem in large data volume. - Some other bug fixes.