-
Notifications
You must be signed in to change notification settings - Fork 1.4k
release 1.0
A line in the sand
- go.mod is functionally supported (deps tools support has been removed)
- Bug fixes and small improvements
It is exciting to have versioned modules again. Here are the steps to to take you there. Below is the old layout of a typical project
-
my_gocode/
- GOPATH root-
src/
- GOPATH src/ directory-
github.com/revel/revel/
- Revel source code -
bitbucket.org/me/sample/
- Sample app root-
app/
- app sources -
tests/
- test suites -
conf/
- configuration files -
messages/
- i18n message files -
public/
- static/public assets -
entities/
- domain entities
-
-
-
-
my_gocode/
- GOPATH root-
go.mod
- The go.mod file -
app/
- app sources -
tests/
- test suites -
conf/
- configuration files -
messages/
- i18n message files -
public/
- static/public assets -
entities/
- domain entities
-
Basically everything under the traditional src folder (and subfolders) can be moved up into a single file If you were working on the above project you would do (after getting the latest version of Revel cmd)
go get github.com/revel/cmd/revel
$ cd my_gocode
$ go mod init bitbucket.org/me/sample/
$ mv src/bitbucket.org/me/sample/* .
$ rm src
$ go mod tidy
The last step should examine your source code and add any required modules to the code base. If you have local references you can override them as needed, for example the following will modify the go.mod to use the develop version of Revel to build the application
revel build --gomod-flags "edit -replace=github.com/revel/revel=github.com/revel/revel@develop" -a my_gocode -t build/my_gocode
None, old code should still compile without issues, there is a backwards compatibility path. I there is no go.mod file in the project folder it will use it automatically.
- go.mod support.
- go.mod support
Development
Resources
Community