[go-nuts] How to properly release a new project as a V2 module

2019-03-02 Thread 'Bryan Mills' via golang-nuts
The /v2 suffix is not just for within your code: that's how you need to address 
the module (and import its packages) everywhere.

The contents of your go.mod file suggest that your calling code, or perhaps the 
`go get` command you used to add the module, is missing that suffix.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] How to properly release a new project as a V2 module

2019-03-01 Thread marcinr
Hi All,

I've open sourced some work that I've done to generate Go server stubs from 
OpenAPI 3.0 specifications, found here:

https://github.com/deepmap/oapi-codegen

However, I can't figure out why I can't import my code as a V2 module.

The release is tagged with v2.0.0, my go.mod file specifies 
github.com/deepmap/oapi-codegen/v2 as the module path.
Within my module, I have to use the v2/ prefix in imports.

When I try to import my module, however, I get this in my go.mod:

module codereview.deepmap.ai/deepmap-services/go/v2

require (
github.com/deepmap/oapi-codegen v2.0.0+incompatible // indirect
github.com/golang/protobuf v1.3.0
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/echo/v4 v4.0.0
golang.org/x/net v0.0.0-20190301231341-16b79f2e4e95
google.golang.org/grpc v1.19.0
)

How does one properly release a fresh v2 Go module?

Thanks,
-- Marcin

-- 
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.
For more options, visit https://groups.google.com/d/optout.