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

Implement stringer interface for the Query type #451

Merged
merged 3 commits into from Aug 12, 2015
Merged

Implement stringer interface for the Query type #451

merged 3 commits into from Aug 12, 2015

Conversation

@johnweldon
Copy link
Contributor

@johnweldon johnweldon commented Aug 7, 2015

To make logging a little nicer in downstream usage.

To make logging a little nicer in downstream usage.
@Zariel
Copy link
Member

@Zariel Zariel commented Aug 10, 2015

Hi, thanks for this. It might be worth making this consistent with the other string methods in frame, something like

[query statment=%q values=%+#v consistency=%s]

Loading

@johnweldon
Copy link
Contributor Author

@johnweldon johnweldon commented Aug 10, 2015

makes sense - will do
Thanks

Loading

@Zariel
Copy link
Member

@Zariel Zariel commented Aug 10, 2015

Also if you are not already could you add yourself to the AUTHORS file, thanks.

Loading

@@ -434,6 +434,11 @@ type Query struct {
defaultTimestamp bool
}

// String implements the stringer interface.
func (q *Query) String() string {
Copy link
Contributor

@bfontaine bfontaine Aug 12, 2015

Choose a reason for hiding this comment

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

Why did you implement it on a pointer receiver?

Loading

Copy link
Contributor Author

@johnweldon johnweldon Aug 12, 2015

Choose a reason for hiding this comment

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

Good catch @bfontaine - it was actually a mistake I've made for a few months now. I mis-interpreted Effective Go and have been "doing it wrong" until you asked the question :)

I'll fix this.

Loading

@johnweldon
Copy link
Contributor Author

@johnweldon johnweldon commented Aug 12, 2015

Okay @bfontaine and @Zariel - I think this is finally ready to merge :)

Loading

Zariel added a commit that referenced this issue Aug 12, 2015
Implement stringer interface for the Query type
@Zariel Zariel merged commit 9d122d6 into gocql:master Aug 12, 2015
1 check passed
Loading
@Zariel
Copy link
Member

@Zariel Zariel commented Aug 12, 2015

Thank you for the contribution!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants