From 2e17c76d6f2896b86c341bc97a25dc6e6f4c8770 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Wed, 21 Jun 2023 18:21:56 +0200 Subject: [PATCH] Remove \r from new line print statments --- cmd/sync/output.go | 2 +- libs/cmdio/render.go | 2 +- libs/git/reference.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/sync/output.go b/cmd/sync/output.go index 57ebdbd440..2785343f92 100644 --- a/cmd/sync/output.go +++ b/cmd/sync/output.go @@ -46,7 +46,7 @@ func textOutput(ctx context.Context, ch <-chan sync.Event, w io.Writer) { // Sync events produce an empty string if nothing happened. if str := e.String(); str != "" { bw.WriteString(str) - bw.WriteString("\r\n") + bw.WriteString("\n") bw.Flush() } } diff --git a/libs/cmdio/render.go b/libs/cmdio/render.go index 24dec02cf8..7b3da190c6 100644 --- a/libs/cmdio/render.go +++ b/libs/cmdio/render.go @@ -53,7 +53,7 @@ func renderJson(w io.Writer, v any) error { if err != nil { return err } - _, err = w.Write([]byte("\r\n")) + _, err = w.Write([]byte("\n")) return err } diff --git a/libs/git/reference.go b/libs/git/reference.go index 66bd5403e8..4021f2e602 100644 --- a/libs/git/reference.go +++ b/libs/git/reference.go @@ -38,7 +38,7 @@ func isSHA1(s string) bool { } func LoadReferenceFile(path string) (*Reference, error) { - // read referebce file content + // read reference file content b, err := os.ReadFile(path) if os.IsNotExist(err) { return nil, nil