Re: [go-nuts] [ANN] gomvpkg: move a package, updating import declarations

2019-07-01 Thread aoneal
Correction:

cat go.mod

> module github.com/myuser/myproject


I had a correct go.mod in my project, I just updated it wrong when I posted 
the "sanitized" example. 

-- 
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/27f4ad81-ddae-4a71-a73b-29d052161bd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] [ANN] gomvpkg: move a package, updating import declarations

2019-07-01 Thread aoneal
Does this tool no longer work since the move to go modules?

pushd myproject/

cat go.mod

> github.com/myuser/myproject

 
gomvpkg -from github.com/myuser/myproject/foo/bar -to 
github.com/myuser/myproject/foo/baz

> gomvpkg: src dir not found for package: 
> github.com/myuser/myproject/foo/bar.

-- 
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/1fff3fe1-486a-479f-9967-1858dc3fa099%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goforward: What is it? How do I use it?

2019-07-01 Thread aoneal

>
>
> I'm not confident that there is now more documentation in this thread in 
> regards to go forward than there is anywhere else on the web.
>

I meant to say "I'm now confident that there is more ..."

What it does:

It reads an entire source package and outputs a single type alias file that 
describes the package.

The idea being that you may have few major breaking changes that need a new 
function definition or a new type, but the majority of code could stay the 
same between your v1 and v2, and it may be possible to fix many bugs or add 
many features to both v1 and v2 simultaneously this way.

How to use it:

  pushd ~/Code/github.com/example/go-foo

  cat go.mod

> module github.com/example/go-foo


  goforward github.com/example/go-foo/barpkg 
github.com/example/go-foo/barpkg/v2

What the result looks like:

  ls barpkg/v2/

> forward.go

 
  cat forward.go

> // generated by goforward github.com/example/go-foo/barpkg 
> github.com/example/go-foo/barpkg/v2
> package adapter
> import (
> "time"
> "github.com/example/go-foo/barpkg"
> ) 

 

// Sprockets by spacely are the best
> var Sprocket = barpkg.Sprocket 

 

// Widget does some such or other
> type Widget = barpkg.Widget  


> // New returns a Widget that's guaranteed to break by exp 

func New(exp time.Time) *Widget {
> return (exp)
> } 

-- 
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/b20f22e1-3385-4a7c-8e74-5b0019c123c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goforward: What is it? How do I use it?

2019-07-01 Thread aoneal


> 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.
>

I did not see that before. Odd that they put it over on the right by the 
message history rather than on the left by the code history.

Thanks for sharing the output of the help too.

I'm not confident that there is now more documentation in this thread in 
regards to go forward than there is anywhere else on the web.

:)

-- 
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/84040d47-a88a-49c6-8ebb-50d51f50f8ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.