Procházet zdrojové kódy

Make sure the debug log contains line breaks (#1650)

Many debug logs have no line breaks, so fix them here.

- With pull requests:
  - Open your pull request against `master`
  - Your pull request should have no more than two commits, if not you should squash them.
  - It should pass all tests in the available continuous integrations systems such as TravisCI.
  - You should add/modify tests to cover your proposed code changes.
  - If your pull request contains a new feature, please document it on the README.
henrylee2cn před 7 roky
rodič
revize
3d44ff82a1
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      debug.go

+ 3 - 0
debug.go

@@ -51,6 +51,9 @@ func debugPrintLoadTemplate(tmpl *template.Template) {
 
 func debugPrint(format string, values ...interface{}) {
 	if IsDebugging() {
+		if !strings.HasSuffix(format, "\n") {
+			format += "\n"
+		}
 		fmt.Fprintf(os.Stderr, "[GIN-debug] "+format, values...)
 	}
 }