Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address breaking change in satori/go.uuid #68

Merged
merged 3 commits into from
Aug 13, 2018

Conversation

9toon
Copy link
Contributor

@9toon 9toon commented Aug 13, 2018

This PR fixes the error caused by breaking changes in satori/go.uuid package.
ref: satori/go.uuid#66


I've faced the following error when I tried to build Kinu with latest commit hash.

HEAD is now at befc007 Bump to 1.0.0.alpha13
# github.com/tokubai/kinu
./handler_sandbox.go:20:23: multiple-value uuid.NewV4() in single-value context

@9toon
Copy link
Contributor Author

9toon commented Aug 13, 2018

@TakatoshiMaeda plz review it 👀 🙏

@@ -17,7 +17,8 @@ func UploadImageToSandboxHandler(w http.ResponseWriter, r *http.Request, ps http

r.ParseMultipartForm(0)

imageId := uuid.NewV4().String()
uuidObject, _ := uuid.NewV4()
Copy link
Collaborator

Choose a reason for hiding this comment

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

If an error occurs, can we continue the processing after this?
It seems necessary to properly handle the error.

How about this way?

imageId, err := uuid.NewV4()
if err != nil {
  RespondInternalServerError(w, err)
  return
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right 🙏
i fixed it 0f97b2d


and simplified the variable name 📝 29b4bbf

Copy link
Collaborator

@takatoshi-maeda takatoshi-maeda left a comment

Choose a reason for hiding this comment

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

thx!

@takatoshi-maeda takatoshi-maeda merged commit 2d01f20 into kufu-ai:master Aug 13, 2018
@9toon 9toon deleted the fix/uuid-error branch August 14, 2018 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants