Hi AJ, To reduce the suspense, I probably should have included the full help message:
$ ./gofoward help Usage: goforward [-n] [-move | -filter=REGEXP] [-replace] [-filename=NAME] SOURCE DEST -filename string destination file in which to write forwards (default "forward.go") -filter string forward only the top-level identifiers matching this regexp (default ".*") -move move the existing contents of SOURCE to DEST, leaving forwarding declarations at SOURCE (otherwise, write declarations at DEST forwarding to SOURCE) -n print the locations and contents of files instead of writing them -replace replace conflicting declarations in the destination package (otherwise, do not forward conflicting declarations) HTH, thepudds On Friday, June 28, 2019 at 11:02:32 PM UTC-4, t hepudds wrote: > > Hi AJ, > > In terms of detailed write-ups on how gofoward works, to my knowledge the > best place to start is reading the commit message and then the help message > you get once you build goforward. > > The author (Bryan Mills) has stated there is still some work to do to > finish it up, including addressing some bugs, but people have used it > successfully. A sample recent PR generated by someone from the broader > community using gofoward is here: > https://github.com/mediocregopher/radix/pull/128 > > In terms of how you get it, when you go to > https://go-review.googlesource.com/c/tools/+/137076/, you should see a > 'Download' button on the right side. If you click on that, it gives you 4-5 > options ranging from 'git fetch' to downloading a zip. > > Here's a quick example (following one of the 'Download' options there): > > $ cd $(mktemp -d) > $ git clone https://go.googlesource.com/tools . > $ git fetch "https://go.googlesource.com/tools" > refs/changes/76/137076/9 && git checkout FETCH_HEAD > $ cd cmd/goforward > $ go build > $ ./goforward help > > Usage: goforward [-n] [-move | -filter=REGEXP] [-replace] > [-filename=NAME] SOURCE DEST > ... > > Hope that helps some, > thepudds > > On Friday, June 28, 2019 at 8:53:52 PM UTC-4, Ian Lance Taylor wrote: >> >> On Fri, Jun 28, 2019 at 5:14 PM AJ ONeal <cool...@gmail.com> wrote: >> > >> > I was looking at the Module page on the Wiki ( >> https://github.com/golang/go/wiki/Modules ) for instruction on how to >> handle breaking API changes (v2, v3, etc) and I noticed mention of the >> mythical `goforward`: >> > >> >> A more sophisticated approach here could exploit type aliases >> (introduced in Go 1.9) and forwarding shims between major versions residing >> in different subdirectories. This can provide additional compatibility and >> allow one major version to be implemented in terms of another major >> version, but would entail more work for a module author. An in-progress >> tool to automate this is goforward. Please see here for more details and >> rationale, along with a functioning initial version of goforward. >> > >> > >> > I also found multiple mentions of it (by the author, I assume) on the >> Golang issues on Github, claiming that it may solve various problems. And I >> think "that's cool, but... how do I get it?" >> > >> > I went to the suggested link ( >> https://go-review.googlesource.com/c/tools/+/137076/ ), but there's no >> instruction on how to install, how to use it, and maybe even gives less >> digestible information than on the modules wiki. >> > >> > The googlesource.com interface is perhaps the strangest I've ever seen >> for git / code. I'm guessing it must be some sort of internal Google tool >> that you kinda have to be a googler to understand. >> > >> > Nevertheless, I see >> > >> >> Repo: tools >> >> >> >> Branch: master >> > >> > >> > and so I figure there must be a repo somewhere containing this code. >> > >> > I click on the tools link which takes me to >> https://go-review.googlesource.com/q/project:tools ... very confusing. >> > I found the repo settings link which lead me to >> https://go-review.googlesource.com/admin/repos/tools where I finally see >> something familiar: >> > >> >> git clone "https://go.googlesource.com/tools" >> > >> > >> > Now I have the repo cloned... but there's no mention of "goforward" >> and hardly any mention of "forward" at all (which is not the forward I'm >> looking for). >> > >> > It appears that the latest commit was yesterday (June 27th, 2019), but >> I couldn't find the HEAD in the interface and I can't even checkout the >> parent commit (which is shown in the interface): >> > >> >> git checkout a44989a >> >> >> >> >> >> >> >> error: pathspec 'a44989a' did not match any file(s) known to git >> > >> > >> > Where is this thing and how can I try it out? >> >> >> It's in https://golang.org/cl/137076. Not sure what it needs before >> being submitted, other than a review. >> >> Ian >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/39152ca1-54b0-475e-b629-f29d743ebf98%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.