소스 검색

http2/h2i: update line endings for recent change to console package

The console package empirically seems to require \r\n line endings now,
else the print head does not go back to the left of the screen.

Change-Id: I49f1870b8c48da254afaeaf3daf2e8fdd0432d52
Reviewed-on: https://go-review.googlesource.com/32321
Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com>
Brad Fitzpatrick 9 년 전
부모
커밋
fca93ed71f
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      http2/h2i/h2i.go

+ 3 - 3
http2/h2i/h2i.go

@@ -238,7 +238,7 @@ func (app *h2i) Main() error {
 }
 
 func (app *h2i) logf(format string, args ...interface{}) {
-	fmt.Fprintf(app.term, format+"\n", args...)
+	fmt.Fprintf(app.term, format+"\r\n", args...)
 }
 
 func (app *h2i) readConsole() error {
@@ -435,9 +435,9 @@ func (app *h2i) readFrames() error {
 				return nil
 			})
 		case *http2.WindowUpdateFrame:
-			app.logf("  Window-Increment = %v\n", f.Increment)
+			app.logf("  Window-Increment = %v", f.Increment)
 		case *http2.GoAwayFrame:
-			app.logf("  Last-Stream-ID = %d; Error-Code = %v (%d)\n", f.LastStreamID, f.ErrCode, f.ErrCode)
+			app.logf("  Last-Stream-ID = %d; Error-Code = %v (%d)", f.LastStreamID, f.ErrCode, f.ErrCode)
 		case *http2.DataFrame:
 			app.logf("  %q", f.Data())
 		case *http2.HeadersFrame: