Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

No need for trailing newlines in calls to log.* #62

Open
twaugh opened this issue Sep 20, 2018 · 2 comments
Open

No need for trailing newlines in calls to log.* #62

twaugh opened this issue Sep 20, 2018 · 2 comments

Comments

@twaugh
Copy link
Collaborator

twaugh commented Sep 20, 2018

https://github.com/release-engineering/backvendor/blob/3a4f5a07095ffdb746b2f4855ee6d8515855516c/main.go#L107

@RalphCorderoy
Copy link
Contributor

I put them in, probably for consistency if the log is changed to something else that's not magical. IIRC one of the magic stdlib \n-adders used to do another Write, but package log is doing an append before the Write. https://golang.org/src/log/log.go?#L169

@twaugh
Copy link
Collaborator Author

twaugh commented Sep 20, 2018

Not a bad idea.

In fact log here is from github.com/op/go-logging (https://github.com/release-engineering/backvendor/blob/master/backvendor/gosource.go#L31).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants