Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Remove fatal calls from sdk client creation#123

Merged
cmoog merged 1 commit intomasterfromfix-fatal
Sep 17, 2020
Merged

Conversation

cmoog
Copy link
Contributor

Closes#114

@cmoogcmoog marked this pull request as ready for reviewSeptember 8, 2020 21:23
@cmoogcmoogforce-pushed thefix-fatal branch 3 times, most recently from8337987 to1594a12CompareSeptember 15, 2020 18:00
@cmoogcmoog requested a review fromcreackSeptember 15, 2020 18:00
Copy link
Contributor

@creackcreack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Might want to consider adding more wrapping, but lgtm. Big improvement!

iferr!=nil {
returnerr
}

absLocal,err:=filepath.Abs(local)
iferr!=nil {
flog.Fatal("make abs path out of %v: %v",local,absLocal)
returnxerrors.Errorf("make abs path out of %s: %s",local,absLocal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

nit: might want to add a %w with the underlying error?

cmoog reacted with thumbs up emoji
@@ -95,7 +98,7 @@ func makeRunSync(init *bool) func(cmd *cobra.Command, args []string) error {
ifrsyncErr!=nil {
flog.Info("Unable to determine remote rsync version. Proceeding cautiously.")
}elseiflocalVersion!=remoteVersion {
flog.Fatal("rsync protocol mismatch: local = %v, remote = %v",localVersion,rsyncErr)
returnxerrors.Errorf("rsync protocol mismatch: local = %s, remote = %s",localVersion,rsyncErr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

might want to remove rsyncErr here as we know it will be nil. I suspect it might have been a typo for remoteVersion?

cmoog reacted with thumbs up emoji
@cmoogcmoog merged commitbf9a6ae intomasterSep 17, 2020
@cmoogcmoog deleted the fix-fatal branchSeptember 17, 2020 14:42
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@creackcreackcreack approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Avoid fatal when checking for auth
2 participants
@cmoog@creack

[8]ページ先頭

©2009-2025 Movatter.jp