how to contribute matchers

29 views
Skip to first unread message

Thorsten von Eicken

unread,
Jul 1, 2014, 2:29:30 AM7/1/14
to ginkgo-a...@googlegroups.com
I'd like to contribute a "BeAfter" matcher that compares time.Time values. To get good results, I also have to enhance the formatStruct function to print time.Time values more nicely. I know what to change, but I wonder how to deal with the import statements. It seems that I have to change all import "github.com/onsi/gomega" in the gomega source tree of my forked repo in order to use my fork, but then that's gonna pollute the pull request. Is there a trick to avoid this?
And... if there's a reason a BeAfter matcher is not desirable, let me know and I'll save myself the trouble...

Onsi Fakhouri

unread,
Jul 1, 2014, 11:22:53 PM7/1/14
to ginkgo-a...@googlegroups.com
I think the simplest way to contribute would be to fork the repo and then `git clone` your forked repo into `$GOPATH/src/github.com/onsi/gomega`.  That way you don't have to mess with the imports but can still point to your fork...  symlinks might work too?

Onsi


On Tue, Jul 1, 2014 at 1:29 AM, Thorsten von Eicken <t...@rightscale.com> wrote:
I'd like to contribute a "BeAfter" matcher that compares time.Time values. To get good results, I also have to enhance the formatStruct function to print time.Time values more nicely. I know what to change, but I wonder how to deal with the import statements. It seems that I have to change all import "github.com/onsi/gomega" in the gomega source tree of my forked repo in order to use my fork, but then that's gonna pollute the pull request. Is there a trick to avoid this?
And... if there's a reason a BeAfter matcher is not desirable, let me know and I'll save myself the trouble...

--
https://github.com/onsi/ginkgo
https://github.com/onsi/gomega
---
You received this message because you are subscribed to the Google Groups "Ginkgo And Gomega" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ginkgo-and-gom...@googlegroups.com.
To post to this group, send email to ginkgo-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/ginkgo-and-gomega.
To view this discussion on the web visit https://groups.google.com/d/msgid/ginkgo-and-gomega/a8aa89f4-7235-4fc9-b8e2-79d89c4df97b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thorsten von Eicken

unread,
Jul 2, 2014, 1:17:20 AM7/2/14
to ginkgo-a...@googlegroups.com
I went the symlink route. Feels very hackish, but this is one area where Go sucks...
Reply all
Reply to author
Forward
0 new messages