GoFrame v2去年夏天到今年春天,一路以来的努力,希望大家满意。
感谢所有社区小伙伴的贡献,感谢社区朋友们的支持!
新的一年,我们继续,脚踏实地,不忘初心!
一、重要特性1、新版工程设计
Entity/DAO/DO2、全链路跟踪特性
OpenTelemetryTraceIDOpenTelemetry3、规范路由注册特性
OpenAPIv3SwaggerUI4、全错误堆栈特性
框架层面所做的重大决定
框架 所有 组件错误均支持错误堆栈
详细介绍:全错误堆栈设计
5、全新错误码特性
errorDB6、组件接口化设计
自顶向下统一化的接口化设计
核心组件均采用接口化设计
更高的扩展性、可定制性
更多详细介绍:接口化与泛型设计
7、框架泛型的支持
gvargvargvar8、ORM的大量改进
详细介绍:数据库ORM
9、其他重要改进
HandlerHandler2)日志组件颜色打印
Writer4)调试模式介绍完善
更多详细介绍:调试模式
1、数据组件
/database/gdbTableModelModelModelStruct/StructsScanStructBatchInsert/BatchReplace/BatchSaveInsert/Replace/SaveDoFilterORMSQL&ArgsdriverSQL&ArgsDoCommitORMSQL&ArgsdriverConvertDataForRecordRawSQLModelModelHandlerModelModelUnion/UnionAllSQL/ModelWithOnDuplicate/OnDuplicateExSaveWheref/WhereOrfWhereLT/WhereLTE/WhereGT/WhereGTEWhereOrLT/WhereOrLTE/WhereOrGT/WhereOrGTEWherePrefix/WhereOrPrefixFieldsPrefix/FieldsExPrefixFieldsCount/FieldsSum/FieldsMin/FieldsMax/FieldsAvgLeftJoinOnField/RightJoinOnField/InnerJoinOnFieldOmitEmptyWhere/OmitEmptyDataWhereDataOmitNil/OmitNilWhere/OmitNilDataWhereDatanilTimeZonemysql/pgsqlCacheCloseORM100CreatedAt/UpdatedAt/DeletedAtORMHandleSqlBeforeCommitDoCommitcontext.ContextgdbWithRecord/Result/database/gredisgoredisRedis2、网络组件
/net/ghttpRequestctxRequestFromCtx/g.RequestFromCtxctxRequestClientgclientServerctx*gvar.VarghttpHTTP ClientClientController/net/gtracego.opentelemetry.io/otel3、系统组件
/os/glogcontext.ContextHandlerHandlerWriterPrintln/os/gresExport/os/gfileSizeFormat/os/gcachecontext.Context*gvar.VarMust*panic/os/gcfg*gvar.Varcontext.ContextGetWithEnvGetWithCmdMust*panictoml/yaml/yml/json/ini/xml/os/gcmd*gvar.Var/os/genv*gvar.Var/os/gcroncontext.Contextcontext.Context/os/gtimeSecond/Millisecond/Microsecond/NanosecondTimestamp/TimestampMilli/TimestampMicro/TimestampNano/os/gtimercontext.Contextcontext.Context/os/grpoolcontext.Contextgoroutinecontext.Context/os/gsessiongsession.Storagectxerror*gvar.Var/os/gviewcontext.Contextplus/minus/times/divide/os/gstructsinternalstructsgstructsstruct4、错误处理
/errors/gerrorMessageCodeMessageNewOptionHasStackgcodeNewCode/NewCodeSkip/WrapCode/WrapCodeSkiptextMessage/errors/gcodegcodegerror5、其他组件
/container/garrayAt/debug/gdebugTestDataContenttestdata/encoding/gjsonGet*Getpattern*gvar.VarMust*/frame/gModelRawSQLModel/frame/gORMlogger/frame/gServerlogger/frame/gmvcgmvc/util/gutilDumpjsonSliceToMapWithColumnAsKeySliceMap/utils/gvalidbailBaildatetime-2006-01-02 12:00:00context.Context三、CLI工具链 gcmdinitSingleRepo/MonoRepogen daoV2entity/dao/dtoupdateget