Skip to main content
Version: 2.8.x(Latest)

Dear gfer, the wait is over. It's been over two months since the last release, and during this period, GoFrame has been continually iterating and improving. There are numerous details, and here is a general overview of the release log.

Additionally, GoFrame is participating in the 2019 Most Popular Chinese Open Source Software voting, which ends tomorrow. Feel free to vote for GoFrame: https://www.oschina.net/project/top_cn_2019. You can vote on the webpage and through WeChat.

New Features

  1. WebServer New Features:
  2. Session adds multiple built-in Storage implementations:
  3. Added log component singleton object and optimized configuration management:
  4. Common container containers add Marshal/UnMarshal interface implementation for JSON data format:
  5. Added guuid module for general UUID generation: https://goframe.org/util/guuid/index

Feature Improvements

net

  1. ghttp
    • Enhanced request process handling performance;
    • Server adds configuration for Logger log object;
    • Server exposes GetRouterMap method, enabling developers to more conveniently implement custom permission management;
    • Enhanced server configuration management;
    • Major improvements on the Client object;
    • Client object adds multi-file upload functionality;
    • Request object adds GetError method to retrieve current processing errors;
    • Request object adds independent view object and view variable binding, allowing independent view management for each request and the ability to switch request objects' views through middleware. This feature is disabled by default, with view parsing using the Server object's view;
    • Refactored CORS functionality for the Response object;
    • Added Response.WriteTplDefault method to parse and return default template content;
    • Added more unit test cases;
    • Other improvements;
  2. gipv4/gipv6
    • Some improvement work;
  3. gtcp/gudp
    • Some improvement work;

database

  1. gdb
    • Extensive details improvement work;
    • Removed sql.ErrNoRows error return when query data is empty, retaining the error return for Struct/Structs/Scan methods when data is empty;
    • Enhanced SQL statement output in debug mode to a complete SQL with parameters, for reference only;
    • Where method adds support for gmap data type, including sequential ListMap/TreeMap, etc.;
    • Cache time parameter type for query cache method Cache changed to time.Duration;
    • Renamed data type conversion methods for Record/Result, marking original methods as deprecated;
    • Record/Result query result types add IsEmpty method to determine if the result set is empty;
    • Record type adds GMap method to convert query records to gmap type;
    • Added Option/OptionOmitEmpty methods for input parameter filtering, including Data and Where parameters: https://goframe.org/database/gdb/empty
    • Added field exclusion method FieldsEx: https://goframe.org/database/gdb/senior
    • Added logging feature: https://goframe.org/database/gdb/senior
    • Improved database configuration management: https://goframe.org/database/gdb/config
    • Added extensive unit testing;
  2. gredis

os

  1. gcache
    • Important note: Cache validity period parameter adjusted from interface{} type to time.Duration type, and no longer compatible with previous int type to ensure better performance;
  2. gfcache
    • Due to gcache component's cache time parameter type change, this component's time parameter also changed to time.Duration type;
  3. gcfg
    • Added Available method to determine if configuration is valid;
  4. gfile
    • Added Chdir method for working directory switching;
  5. gtime
    • Added Marshal/UnMarshal interface implementation for JSON data format;

container

  1. gmap
    • Added MapStrAny method for common map type conversion;
    • Added MapCopy method for underlying map data copying;
    • Added FilterEmpty method for map empty value filtering;
    • Added Pop/Pops methods for randomly returning (and deleting) data items in map;
    • Added Replace method to cover the underlying map data with given map data;
    • Improved unit testing;
    • Other enhancements;
  2. garray
    • Added Interfaces conversion method returning []interface{} type;
    • For sorted arrays, added SetComparator method for custom comparator modification;
    • Improved unit testing;
    • Other enhancements;
  3. glist
    • Added NewFrom method to create a list based on a given []interface{} variable;
    • Added Join method to concatenate list items using a given string and return the string;
    • Improved unit testing;
    • Other enhancements;
  4. gset
    • Added AddIfNotExistFunc/AddIfNotExistFuncLock methods;
    • Improved unit testing;
    • Other enhancements;
  5. gtree
    • Added Replace method for updating existing tree data items;
    • Other improvements;
  6. gtype
    • Some detail improvement work, not listed one by one;
    • Improved benchmark testing and unit testing;
  7. gvar
    • Added Ints/Uints type conversion methods;
    • Other enhancements;

crypto

  1. gmd5
    • Minor detail improvements;
  2. gsha1
    • Minor detail improvements;

text

  1. gstr
    • Improved SplitAndTrim method, marked SplitAndTrimSpace as deprecated;
    • Added TrimStr method;
    • Improved unit testing;
    • Other enhancements;

debug

  1. gdebug
    • Added CallerFileLineShort/FuncPath/FuncName methods;
    • Other improvements;

encoding

  1. gbase64
    • Added EncodeToString/EncodeFile/EncodeFileToString/DecodeToString methods;
    • Improved unit testing;
  2. gjson
    • Improved unit testing;

frame

  1. g/gins

util

  1. gconv
    • Improved and optimized performance for some type conversion methods;
    • Added Uints/SliceUint type conversion methods;
    • Added high-performance type conversion methods UnsafeStrToBytes/UnsafeBytesToStr;
    • Added support for MapStrAny interface methods for common map type conversion;
    • Other improvements;
  2. gvalid
    • Improved ID card validation functionality for Chinese IDs;
    • Added luhn bank card number validation functionality;
  3. grand
    • Some performance improvements;

Bug Fix

  1. Fixed hijacked error issue upon WebSocket closure: https://github.com/gogf/gf/issues/381
  2. Resolved memory usage issue for large files during static file service;
  3. Fixed default Cookie domain setting issue when behind Nginx;
  4. Fixed gconv.Struct conversion failure issue when property is []struct and input property parameter is empty: https://github.com/gogf/gf/issues/405
  5. Other fixes;