Skip to content

Commit d24eb6e

Browse files
wxiaoguangzeripath
andauthored
Add GoLand configuration in hacking on gitea (#16843)
Co-authored-by: zeripath <[email protected]>
1 parent 7815f24 commit d24eb6e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/content/doc/developers/hacking-on-gitea.en-us.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,19 @@ Visual Studio Code. Look at
309309
[`contrib/ide/README.md`](https://github.com/go-gitea/gitea/blob/main/contrib/ide/README.md)
310310
for more information.
311311

312+
## GoLand
313+
314+
Clicking the `Run Application` arrow on the function `func main()` in `/main.go`
315+
can quickly start a debuggable gitea instance.
316+
317+
The `Output Directory` in `Run/Debug Configuration` MUST be set to the
318+
gitea project directory (which contains `main.go` and `go.mod`),
319+
otherwise, the started instance's working directory is a GoLand's temporary directory
320+
and prevents gitea from loading dynamic resources (eg: templates) in a development environment.
321+
322+
To run unit tests with SQLite in GoLand, set `-tags sqlite,sqlite_unlock_notify`
323+
in `Go tool arguments` of `Run/Debug Configuration`.
324+
312325
## Submitting PRs
313326

314327
Once you're happy with your changes, push them up and open a pull request. It

0 commit comments

Comments
 (0)