mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Backport #26346 Follow the CLI refactoring, and add tests.
This commit is contained in:
1 parent
8a97cdd91b
commit
fa431b377d
4 files changed
+104
-4
No files matched your search
@@ -16,3 +16,9 @@ func RedirectURL(resp http.ResponseWriter) string {
|
||||
func IsNormalPageCompleted(s string) bool {
|
||||
return strings.Contains(s, `<footer class="page-footer"`) && strings.Contains(s, `</html>`)
|
||||
}
|
||||
|
||||
func MockVariableValue[T any](p *T, v T) (reset func()) {
|
||||
old := *p
|
||||
*p = v
|
||||
return func() { *p = old }
|
||||
}
|
||||
Reference in new issue
Block a user