This repository was archived by the owner on Dec 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Remove custom errorf implementation #111
Merged
cassierecher
merged 8 commits into
googlecodelabs:master
from
cassierecher:standardize-errorf
Nov 20, 2018
Merged
Remove custom errorf implementation #111
cassierecher
merged 8 commits into
googlecodelabs:master
from
cassierecher:standardize-errorf
Nov 20, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sethvargo
suggested changes
Nov 9, 2018
mco-gh
suggested changes
Nov 9, 2018
Contributor
|
I don't feel super strongly about it so happy to defer to your judgement.
…On Fri, 9 Nov 2018 at 20:15, Cassie Recher ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In claat/main.go
<#111 (comment)>:
> AuthToken: *authToken,
Expenv: *expenv,
GlobalGA: *globalGA,
Output: *output,
Prefix: *prefix,
Tmplout: *tmplout,
- })
+ }); !ok {
Creating a custom implementation of a standard library function (that
doesn't behave like the standard library function) seems like bigger
problem to me. The error content is still displayed to the end user, just
like errorf did.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAoLl1IlA66_uuKFV7n0j-Qrcn8xf0Veks5uteJygaJpZM4YW2DD>
.
--
Marc Cohen
mco@google.com
http://about.me/marc1
|
The caller (main) is responsible for invoking os.Exit.
|
I like this approach much better. It feels cleaner. How do you feel @cassierecher? |
sethvargo
suggested changes
Nov 19, 2018
sethvargo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two stylistic things, but this looks really good!
Contributor
Author
|
Yes, this seems much cleaner. I'll now touch up the stylistic stuff. |
No semantic impact; this is purely stylistic.
It was only being used in main, so it didn't make much sense to keep in utils.
sethvargo
approved these changes
Nov 20, 2018
mco-gh
approved these changes
Nov 20, 2018
Open
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes the custom errorf implementation and the associated lock and mutex (which I think were unnecessary upon a close reading of the channel logic used by callers.)