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

New Features and Improvements

  1. The framework currently has 69 development modules (excluding internal modules), with native code of 65302 lines (excluding third-party dependency packages), and unit test coverage reaching 77%;
  2. Added gerror error handling module: https://goframe.org/errors/gerror/index
  3. Improved gcharset character encoding conversion module, supporting more character sets: https://goframe.org/encoding/gcharset/index
  4. Added gmutex module, an advanced mutex module based on channel, supporting more rich mutex features: https://goframe.org/os/gmutex/index
  5. Improved glog logging module:
  6. Improved gdb database ORM module:
  7. Improved gconv data conversion module:
    • Supported more tags during struct object conversion: gconv/c/json;
    • Supported *struct/[]struct/[]*struct automatic initialization and creation: https://goframe.org/util/gconv/struct
    • Added Strusts/StrctsDeep methods for recursive conversion of struct arrays;
    • Added StructDeep method for recursive conversion of struct objects;
    • Added MapDeep method for recursive conversion of struct properties;
  8. Improved ghttp module:
    • Improved the group routing function of ghttp module with more robust logic handling;
    • Improved ghttp.Request.Get*ToStruct methods to support params/param/p tags and recursive struct conversion, with automatic initialization for **struct parameters;
    • Adjusted ghttp.CORSDefault cross-origin settings, with AllowOrigin set to *;
  9. Improved gvalid data validation module:
  10. Improved gtcp TCP communication module:
  11. Improved gproc module communication data structure, using gtcp lightweight packet protocol to optimize message sending logic;
  12. Improved gqueue module with data synchronization buffer mechanism to address memory usage and latency issues under large data volumes;
  13. Improved gmlock module, replacing internal mutexes using gmutex, and added more operation methods;
  14. Improved gaes encryption module by adding CBC encryption/decryption methods;
  15. Improved garray.Range/SubSlice methods for better design and performance;
  16. Improved gjson/gparser modules to implement MarshalJSON interface for custom JSON data format conversion;
  17. Added error variables to return method results in crypto classification to ensure more rigorous interface design style;
  18. Changed input/output types in gbase64 module, adding several related methods;
  19. Changed UnLock to Unlock in gflock, and added IsRLocked method;
  20. Added gfile.CopyFile/CopyDir methods for file and directory copying;
  21. Added more type conversion methods to gjson/gparser/gvar/gcfg modules;
  22. Improved gcache module, with expiration time parameter supporting time.Duration type;
  23. Added internal/structs, a powerful and convenient struct parser, optimizing all modules involving struct reflection processing;
  24. Improved gbinary, adding support for BigEndian with encapsulated methods;

Bug Fixes

  1. Fixed garray.Search return value issue;
  2. Fixed logic issues in garray.Contains, garray.New*ArrayFromCopy methods;
  3. Fixed gjson.Remove slice parameter issue;
  4. Fixed gtree.AVLTree.Remove method return value issue;
  5. Fixed inaccurate size issue in gqueue.Size;
  6. Fixed queue.Close issue;
  7. Fixed deadlock issue in gcache.GetOrSetLockFunc when callback function returns nil result;
  8. Fixed default recursive monitoring addition issue in gfsnotify.Add method;
  9. Fixed issues with gdb.Model.Scan for certain parameter types;

Notes

Please pay attention to the bold parts above, as you may encounter incompatibilities when upgrading.