Version Naming
GoFrame
adopts the GNU
style version naming rule:
MajorVersion.MinorVersion.Revision
That is:
MajorVersion.MinorVersion.Revision
For example:
v0.0.1
, v1.1.0
, 1.7.1
Version explanation:
MajorVersion
: The major version number ofGoFrame
starts from0
, fromalpha
tobeta
to the current official version. The major version indicates a completely new framework version, such as major refactoring, major feature changes, or significant incompatible changes.MinorVersion
: The minor version number is increased when there are large new feature releases, significant refactoring or module changes, or incompatibility changes. A minor version release comes with a complete change log and is considered a significant release. It usually occurs every few months.Revision
: The revision number typically involves bug fixes, or adding minor features, minor improvements, or module changes. It increases the revision number while ensuring full backward compatibility. Revision releases are made irregularly and frequently.- When the major version number increases, the minor and revision numbers are reset to
0
. - When the minor version number increases, the revision number is reset to
0
.
Compatibility Guarantee
GoFrame
promises that every revision release ensures complete backward compatibility for all modules, allowing for easy upgrades.
Due to the rapid development of the GoFrame
framework, with constant additions of new features and improvements, minor version releases may not guarantee full backward compatibility for all modules. However, every minor version release will provide a complete change log to announce the release. If there are compatibility adjustments for some modules, they will be accompanied by relevant keynotes and often include upgrade operation guidance.
Version Upgrade Method
For Golang
project development, it is not recommended to use the vendor
method directly, nor is it recommended to use the framework’s master
branch directly. It is recommended to use the go modules
package management method, that is, to manage package versions using go.mod
.
Before planning any version upgrade, check the latest version number in the repository: https://github.com/gogf/gf/v2/releases. Choose a version number for upgrading, modify go.mod
, save it, and the Goland IDE
will automatically download the corresponding framework version.
If upgrading to the latest framework version, you can also perform a complete upgrade by executing gf up -a
in the project’s root directory using the cli
tool.
Using Specific Versions
master
Branch
The master
branch is a public testing branch. All unreleased code is first merged into the master
branch, and after a certain period of testing, it is tagged for formal release. If some issues are fixed and developers are eager to use the latest version, they can try the master
branch. The update method is as follows:
go get -u github.com/gogf/gf@master
You can also update to a specific git reversion
:
go get -u github.com/gogf/gf@4d3273379022a9518c1dc20ebada612cddeed764
develop
Branch
The develop
branch is the development branch. All development feature branches are unified and merged into the develop
branch for joint testing and debugging. Once confirmed, they are merged into the master
branch. Note that the develop
branch cannot be used in a production environment. Contributor PRs are also merged into the develop
branch. The update method is as follows:
go get -u github.com/gogf/gf@develop
You can also update to a specific git reversion
:
go get -u github.com/gogf/gf@0e58b6e95ba211fcde27954a68cbf4acadbb6bc9