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

New Features

  1. Graceful restart feature (http://gf.johng.cn/625833);
  2. gflock file lock module (http://gf.johng.cn/626062);
  3. gproc process management and communication module (http://gf.johng.cn/626063);
  4. gpage pagination management module, with powerful dynamic and static pagination features, and high flexibility for developers to customize pagination styles (http://gf.johng.cn/597431);
  5. ghttp.Server adds multi-port listening feature and supports HTTP/HTTPS (http://gf.johng.cn/494366, http://gf.johng.cn/598802);
  6. Added gspath directory search package management tool, supporting file search features across multiple directories;
  7. ghttp package controller and execution object registration adds more flexible dynamic routing features, with added support for {method} variable in routing rules;

New Functions

  1. gutil package adds MapToStruct method, supporting mapping of map data types to struct objects;
  2. gconv
    • gconv package adds type conversion based on type name strings;
    • gconv package adds Time/TimeDuration type conversion methods;
  3. ghttp
    • Adds WebServer directory security access control mechanism;
    • ghttp.Server adds custom status code callback function registration handling;
  4. gdb
    • gdb package adds gdb.GetStruct/gdb.Model.Struct methods for automatic conversion of query result records to specified objects;
    • gdb adds Value/Record/Result types and a series of type conversion methods for Value type;
    • gdb package adds db.GetCount, tx.GetCount, model.Count count query methods;

Function Improvements

  1. Improved gredis client function encapsulation;
  2. Improved performance of grand package random number generation;
  3. Added benchmark performance testing scripts for grand/gdb/gredis packages;
  4. Improved implementation of ToStruct method in gjson/gparser packages;
  5. gdb: Improved performance of gdb.New in obtaining ORM operation objects;
  6. gcfg: Improved configuration file retrieval function;
  7. gview: Template engine adds multiple directory search capabilities;
  8. gfile: Adds method MainPkgPath to obtain source main package directory;
  9. ghttp
    • ghttp.Request adds logging of request entry and completion times, including these in default log content;
    • ghttp.Server event callbacks support parameter passing through ghttp.Request.Param with custom parameters;
  10. gdb
    • Improved type conversion between gdb.Result and gdb.List, gdb.Record, and gdb.Map for easier data encoding processing (like json/xml) at the business layer;
    • Improved return type for gdb.Tx.GetValue;
    • gdb.Model.Data parameter supports more flexible map parameters;

Issue Fixes

  1. ghttp
    • Fixed caching issue in ghttp package routing;
    • Fixed controller and execution object method loss issue during service registration;
  2. gconv
    • Corrected bit size setting issue in gconv.Float64 method;
    • Fixed issue with gconv.Int64(float64(xxx));
  3. gdb
    • Fixed issue with gdb.GetAll where for..range.. returns slice with same pointer for returned data list;
    • Fixed error in gdb.Delete method;
    • Fixed gdb.Model.And/Or method;
    • Fixed parameter handling issue in gdb.Model.Where method;
  4. garray: Fixed lock mechanism issue with garray package Remove method;
  5. gtype: Fixed logical error in methods of gtype.Float32/gtype.Float64 object types;
  6. gfsnotify: Fixed issue of hot update mechanism failure caused by different file separators in file parameters on Windows;
  7. Fixed gvalid package validation issue: if value is nil and require* validation is not needed, other validations would fail. Added unit test items, all tests passed.