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
v2.0 #30
v2.0 #30
Conversation
@kalaninja thanks for this PR! Don't worry about README etc for now, we can address the docs/website issues later. Do you mind giving a brief overview of how much exported function/type signatures have changed? That would help me to review and give an idea of how much of a breaking change it is. |
@@ -1,14 +1,21 @@ | |||
Copyright 2013 Ahmet Alp Balkan | |||
The MIT License (MIT) |
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.
I guess this one is a leftover. Can you please revert this file?
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.
Sure. Didn't notice that.
About an overview it seems to be a good idea? How do you want to have that info? I may do it as a table in excel or google docs with my methods on one side and yours on the other? Or you might have a better idea? |
@kalaninja actually, I think I got the main idea. There are quite many new methods, some methods are gone, errors are gone, I also found godocs to be helpful. How about you add a
|
Yes, I don't have error because they made the predicates look ugly, and its effect can be achieved with panic and recover. I'll do the readme asap. Agree with the todo list. And I do not believe that the wiki is really helpful (I didn't even know that you have one)) You have a beautiful site and we might invest more effort there. |
// func (f foo) CompareTo(c Comparable) int { | ||
// a, b := f.f1, c.(foo).f1 | ||
// | ||
// if a < b { |
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.
this code can be shorter as?:
switch{
case a>b: return -1
case b<a: return 1
default: return 0
}
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.
they seem pretty the same legth since I use gofmt
switch {
case a > b:
return -1
case b < a:
return 1
default:
return 0
}
vs
if a < b {
return -1
} else if a > b {
return 1
}
return 0
There are other variants as well. Consider:
if a < b {
return -1
}
if a > b {
return 1
}
return 0
WDYT?
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.
I guess it doesn't matter too much then. I still prefer
switch {
case a > b:
return -1
case b < a:
return 1
default:
return 0
}
mostly because it's easier to follow
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.
Yes, I agree. It looks really straightforward. I'll change that.
@kalaninja This generally looks good to me. Can you just add a README by copying from the current one and updating the example etc. Then it would be good to merge. Then we can address other stuff in #30 (comment). |
I've attached the readme, changed "if" to "switch" and removed the book struct from the example. |
}).First() | ||
``` | ||
|
||
**More examples** can be found in [documentation](https://godoc.org/gopkg.in/ahmetalpbalkan/go-linq.v2) |
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.
Maybe don't link to these like v2 yet because we'll merge it to master
.
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.
And what will happen with the current version?
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.
I archived the current version in archive/0.9
branch, anybody who wants to use it I guess can grab it from there or perhaps grab it via go get gopkg.in/...
(we have a v0.9-rc5
tag, we can tag it as v0.9
anytime if that'll make it work with gopkg.in).
I've fixed links in readme, removed the line about plinq, recovered the one about vanilla go, added release notes. |
@kalaninja thanks! I'll open issues for the rest of the updates we probably need to make. |
💥 🎊 🍷🍾 |
Hi there,
I've managed to deal with all my "busy man" problems. So, back online and ready for some opensource.
Here is the PR for v2.0. It doesn't have a readme file yet, because I am unaware about the links to godoc, travis, etc. I assume that if we tag the new commit with as "v2.0", the link to godoc would be smth like
https://godoc.org/gopkg.in/ahmetalpbalkan/go-linq.v2.0 and it seems that tha branch for travis and coveralls can be specified at their urls. Is it correct? Should I tag it myself?