loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request '[CHORE] Remove `println`' (#3185) from gusted/forgejo-println into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3185
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>

Gusted 0c42e3c7 9ef05fec

+9 -24
+2 -2
build/backport-locales.go
··· 18 18 19 19 func main() { 20 20 if len(os.Args) != 2 { 21 - println("usage: backport-locales <to-ref>") 22 - println("eg: backport-locales release/v1.19") 21 + fmt.Println("usage: backport-locales <to-ref>") 22 + fmt.Println("eg: backport-locales release/v1.19") 23 23 os.Exit(1) 24 24 } 25 25
+5 -5
cmd/serv.go
··· 136 136 setup(ctx, c.Bool("debug")) 137 137 138 138 if setting.SSH.Disabled { 139 - println("Forgejo: SSH has been disabled") 139 + fmt.Println("Forgejo: SSH has been disabled") 140 140 return nil 141 141 } 142 142 ··· 164 164 } 165 165 switch key.Type { 166 166 case asymkey_model.KeyTypeDeploy: 167 - println("Hi there! You've successfully authenticated with the deploy key named " + key.Name + ", but Forgejo does not provide shell access.") 167 + fmt.Println("Hi there! You've successfully authenticated with the deploy key named " + key.Name + ", but Forgejo does not provide shell access.") 168 168 case asymkey_model.KeyTypePrincipal: 169 - println("Hi there! You've successfully authenticated with the principal " + key.Content + ", but Forgejo does not provide shell access.") 169 + fmt.Println("Hi there! You've successfully authenticated with the principal " + key.Content + ", but Forgejo does not provide shell access.") 170 170 default: 171 - println("Hi there, " + user.Name + "! You've successfully authenticated with the key named " + key.Name + ", but Forgejo does not provide shell access.") 171 + fmt.Println("Hi there, " + user.Name + "! You've successfully authenticated with the key named " + key.Name + ", but Forgejo does not provide shell access.") 172 172 } 173 - println("If this is unexpected, please log in with password and setup Forgejo under another user.") 173 + fmt.Println("If this is unexpected, please log in with password and setup Forgejo under another user.") 174 174 return nil 175 175 } else if c.Bool("debug") { 176 176 log.Debug("SSH_ORIGINAL_COMMAND: %s", os.Getenv("SSH_ORIGINAL_COMMAND"))
-16
modules/git/diff_test.go
··· 159 159 } 160 160 } 161 161 162 - func ExampleCutDiffAroundLine() { 163 - const diff = `diff --git a/README.md b/README.md 164 - --- a/README.md 165 - +++ b/README.md 166 - @@ -1,3 +1,6 @@ 167 - # gitea-github-migrator 168 - + 169 - + Build Status 170 - - Latest Release 171 - Docker Pulls 172 - + cut off 173 - + cut off` 174 - result, _ := CutDiffAroundLine(strings.NewReader(diff), 4, false, 3) 175 - println(result) 176 - } 177 - 178 162 func TestParseDiffHunkString(t *testing.T) { 179 163 leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString("@@ -19,3 +19,5 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER") 180 164 assert.EqualValues(t, 19, leftLine)
+2 -1
tests/e2e/debugserver_test.go
··· 10 10 package e2e 11 11 12 12 import ( 13 + "fmt" 13 14 "net/url" 14 15 "os" 15 16 "os/signal" ··· 24 25 signal.Notify(done, syscall.SIGINT, syscall.SIGTERM) 25 26 26 27 onGiteaRun(t, func(*testing.T, *url.URL) { 27 - println(setting.AppURL) 28 + fmt.Println(setting.AppURL) 28 29 <-done 29 30 }) 30 31 }