1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-14 14:37:20 +00:00

Refactor "dump" sub-command (#30240) (#30260)

Backport #30240 by wxiaoguang

Major changes:

* Move some functions like "addReader" / "isSubDir" /
"addRecursiveExclude" to a separate package, and add tests
* Clarify the filename&dump type logic and add tests
* Clarify the logger behavior and remove FIXME comments

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-04-03 10:47:06 +08:00
committed by GitHub
parent 6bf6fa8de0
commit e8d5d5ed49
6 changed files with 374 additions and 229 deletions

View File

@ -21,8 +21,9 @@ var (
)
// MockSet sets the time to a mocked time.Time
func MockSet(now time.Time) {
func MockSet(now time.Time) func() {
mockNow = now
return MockUnset
}
// MockUnset will unset the mocked time.Time