v1.10.0
You gfer
wait too long, compared with the previous Published in the past has been more than two months, this time GF
also constantly iterative improvement, more details of the proposed ballpark, the following is release log
.
In addition, GoFrame
also participated in the 2019 China's most popular open source software selection vote, tomorrow is over, welcome to GF
vote ah: https://www.oschina.net/project/top_cn_2019 page can vote, micro-channel can also vote .
New features
Web Server
New features:- Middleware and improved packet routing realization: https://goframe.org/net/ghttp/router/middleware
- Increased file configuration management features: https://goframe.org/net/ghttp/config
- Improved parameter acquisition: https://goframe.org/net/ghttp/request
- Improved file upload: https://goframe.org/net/ghttp/client/demo/upload
Session
Increase the variety of built-inStorage
implementation:- Basic introduction: https://goframe.org/os/gsession/index
- File Storage: https://goframe.org/os/gsession/file
- Memory storage: https://goframe.org/os/gsession/memory
Redis
Storage: https://goframe.org/os/gsession/redis
- Increasing log component singleton object, configuration management and optimization:
- Commonly used
container
containers increasedJSON
data formatMarshal
/UnMarshal
interface: - New
guuid
modules for generalUUID
generation: https://goframe.org/util/guuid/index
Improvements
net
ghttp
- Improved processing performance request process;
Server
IncreasedLogger
configuration log object;Server
Open aGetRouterMap
method for obtaining a list of current service routing information so that developers can more easily achieve custom permissions management;Server
Configuration management optimization;Client
Client object a lot of improvements;Client
Client object to increase multi-file upload function;Request
Object additionGetError
method, the current process for obtaining an error;Request
Add a separate view objects and view objects variable binding function, such that each request may independently manage the view, the view may be switched by the object request object middleware. By default, the function is turned off, is used when the view resolutionServer
view of the subject object;- Alterations
Response
objectCORS
function; - Increase
Response.WriteTplDefault
method for parsing and return to the default template content; - Means adding more test cases;
- Other improvements;
gipv4
/gipv6
- Some improvements;
gtcp
/gudp
- Some improvements;
database
gdb
- A lot of detail improvements;
- Removing the query data is null
sql.ErrNoRows
error return, reservationStruct
/Structs
/Scan
The method of operation of the error data returned is empty; - When debug mode is turned on, SQL output statements is complete with improved parameters of SQL, for reference only;
Where
A method for increasing thegmap
data type support, comprising the sequentialListMap
/TreeMap
and the like;- Query caching method
Cache
of cache time parameter type is changed totime.Duration
; - Modify
Record
/Result
data type name conversion method, conversion method is marked as olddeprecated
; Record
/Result
Results Type increasingIsEmpty
method for determining whether the result set is empty;Record
Increasing typeGMap
methods, is converted to a query recordgmap
type;- Increase
Option
/OptionOmitEmpty
method for filtering the input parameters, includingData
parameters andWhere
parameters: https://goframe.org/database/gdb/empty - Add Field Remedy
FieldsEx
: https://goframe.org/database/gdb/senior - Increase logging feature: https://goframe.org/database/gdb/senior
- Improved configuration management database: https://goframe.org/database/gdb/config
- Increase the number of unit testing;
gredis
- Return data type conversion improvements: https://github.com/gogf/gf/issues/415
- Improve unit testing;
- Other improvements;
os
gcache
- Note: the parameter from the cache valid time
interface{}
adjustment type totime.Duration
type, and therefore is no longer compatible with previousint
parameter type, in order to guarantee better performance;
- Note: the parameter from the cache valid time
gfcache
- Since the
gcache
cache time change component type parameter, a time parameter of the assembly thus be changed totime.Duration
type;
- Since the
gcfg
- Increasing
Available
method for determining configuration is valid;
- Increasing
gfile
- Increasing
Chdir
method for working directory;
- Increasing
gtime
- Increasing the
JSON
data formatMarshal
/UnMarshal
interface;
- Increasing the
container
gmap
- Increasing
MapStrAny
method for a commonmap
type of conversion; - Increasing
MapCopy
method for the underlyingmap
data replication; - Increasing
FilterEmpty
method formap
a null filter; - Increase
Pop
/Pops
method for random returnmap
data items (and remove); - Increasing
Replace
method, for a givenmap
data covering the underlyingmap
items; - Improve unit testing;
- Other improvements;
- Increasing
garray
- Increasing the
Interfaces
conversion method, return[]interface{}
type; - To increase the sorted array
SetComparator
method custom modifications comparator; - Improve unit testing;
- Other improvements;
- Increasing the
glist
- Increase
NewFrom
method, based on the given[]interface{}
creation chain variable; - Increasing
Join
method for the linked list item given string is a string return connection; - Improve unit testing;
- Other improvements;
- Increase
gset
- Increase
AddIfNotExistFunc
/AddIfNotExistFuncLock
methods; - Improve unit testing;
- Other improvements;
- Increase
gtree
- Increasing
Replace
method for updating an existing tree data items; - Other improvements;
- Increasing
gtype
- Some details of the improvements, not an exhaustive list;
- Perfect benchmark testing, unit testing;
gvar
- Increase
Ints
/Uints
type conversion; - Other improvements;
- Increase
crypto
gmd5
- Small detail improvements;
gsha1
- Small detail improvements;
text
gstr
- Improved
SplitAndTrim
methods, theSplitAndTrimSpace
markdeprecated
; - Increase
TrimStr
method; - Improve unit testing;
- Other improvements;
- Improved
debug
gdebug
- Increase
CallerFileLineShort
/FuncPath
/FuncName
method; - Other improvements;
- Increase
encoding
gbase64
- Increase
EncodeToString
/EncodeFile
/EncodeFileToString
/DecodeToString
method; - Improve unit testing;
- Increase
gjson
- Improve unit testing;
frame
g
/gins
- https://goframe.org/frame/g/index
- Increase
CreateVar
method; - Improve unit testing;
- Other improvements;
util
gconv
- Improved performance optimization type conversion portion;
- Increase
Uints
/SliceUint
type conversion; - Increase
UnsafeStrToBytes
/UnsafeBytesToStr
performance type conversion; - Increased
MapStrAny
support for interface method for a commonmap
type of conversion; - Other improvements;
gvalid
- Check function to improve the recognition of Chinese identity card number;
- Increase the
luhn
check function bank card number;
grand
- Some performance improvements;
Bug Fix
- Resolved
WebSocket
when closinghijacked
error issues: https://github.com/gogf/gf/issues/381 - Memory footprint to address the problem of large file static file serving;
- Repair front
Nginx
after case of defaultCookie
domain setup issues; - Repair
gconv.Struct
the property is[]struct
converted to a space-time properties of the input parameters and failures: https://github.com/gogf/gf/issues/405 - Some other fixes;
GF(Go Frame)
It is a modular, high-performance, production-level Go application development framework. It provides a common core development 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 correction inspection, 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.
Feature
- The modular, loosely coupled design;
- Module rich, out of the box;
- Detailed development documentation and examples;
- Improve the local cultural support;
- We are committed to the general scheme of the project;
- More suitable for corporate and team use;
- Please consult the documentation and source code;
installation
go get -u -v github.com/gogf/gf
Recommended use go.mod
:
require github.com/gogf/gf latest
limit
golang version> = 1.10
Architecture
File
Development documents: https://goframe.org
Interface Documentation: https://godoc.org/github.com/gogf/gf
use
package main import ( "github.com/gogf/gf/frame/g" "github.com/gogf/gf/net/ghttp" ) func main() { s := g.Server() s.BindHandler("/", func(r *ghttp.Request) { r.Response.Write("Hello World") }) s.Run() }
协议
GF
使用非常友好的 MIT 开源协议进行发布,永久100%
开源免费。