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

New Features/Improvements

  1. gcron scheduled task module adds operation log recording feature: https://goframe.org/os/gcron/index
  2. gredis adds global group configuration features along with additional configuration options maxIdle/maxActive/idleTimeout/maxConnLifetime: https://goframe.org/database/gredis/index
  3. gcfg module adds more default configuration file retrieval paths, introduces global group configuration features, and provides the Instance singleton method: https://goframe.org/os/gcfg/index
  4. gview module adds more default configuration file retrieval paths and provides the Instance singleton method: https://goframe.org/os/gview/index
  5. ghttp module new features and improvements:
    • Adds CORS HTTP(S) cross-origin request features: https://goframe.org/net/ghttp/cors
    • Adds TLSConfig configuration feature;
    • Removes the error return value from routing registration methods, and prints errors directly to the terminal/log file when registration errors occur;
    • Adds Set-Cookie support during HTTP Code 302 redirections;
    • Adds security checks for SESSION ID;
    • Adds support for HTTPS based WebSocket (WSS): https://goframe.org/net/ghttp/websocket/index
    • Request object adds Error method for logging custom error messages to the WebServer error log;
    • Other improvements;
  6. gdb module new features and improvements:
    • Adds Instance singleton management method;
    • Adds Structs/Scan chaining operation methods, gdb.DB/TX adds GetStructs/GetScan methods for result set struct/slice mapping conversion: https://goframe.org/database/gdb/chaining
    • Adds Safe chaining operation method (not concurrent-safe by default) for chaining safety control: https://goframe.org/database/gdb/chaining
    • Improvements to Where chaining operation method:
      • Supports any string/map/slice/struct/*struct types;
      • Adjusted logic to automatically convert multiple Where method calls in chaining operations to And conditions;
      • Supports slice condition parameters, commonly used in SELECT IN queries, e.g., Where("uid IN(?)", g.Slice{1,2,3});
      • Supports embedding conditions in key of map type condition parameters, e.g., Where(g.Map{"uid>?", uid});
  7. gconv and gvalid modules improve and remove conversion/validation for private struct method attributes;
  8. gconv.Map conversion method adds support for json tag: -, omitempty: https://goframe.org/util/gconv/map
  9. gstr module adds case-insensitive replace methods ReplaceI/ReplaceIByArray/ReplaceIByMap;
  10. gutil module adds IsEmpty method to determine if the given variable is empty (0 for integer, false for boolean, 0 length for slice/map, nil for others), along with a shortcut method g.IsEmpty;
  11. gutil module adds Export method to export and return formatted output of variable contents as a string, along with a shortcut method g.Export;
  12. gspath adds cache and non-cache retrieval methods Search/SearchWithCache;
  13. gjson module adds default UseNumber feature support;
  14. gmap adds SetIfNotExistFunc/SetIfNotExistFuncLock methods;
  15. Migrates greuseport module to a new repository: https://github.com/gogf/greuseport
  16. Numerous unit test improvements;

Bug Fix

  1. Fixed resource competition issue in gqueue module;
  2. Fixed conversion failure issue in gconv.GTime;
  3. Fixed byte overflow issue in gconv.String when converting int parameters;
  4. Fixed HTTP Basic Auth verification issue in ghttp.Request;
  5. Fixed concurrency safety issue in gxml for non-UTF-8 encoded content conversion;
  6. Fixed formatting issues in gtime for some Format (G & j) specifications;
  7. Fixed method issue in gudp.Conn for obtaining client connection address RemoteAddr;
  8. Fixed GetOrSetFuncLock method in gmap/gcache module by adding nil return value check for callbacks, saving only non-nil return values.