Modules in subdirectories should just work, tags are not necessary.
I see there is a recent commit to correct the module name, that was
necessary.

As for your most recent invocation, the module path was wrong (missing a
/src/ component)

$ go get
github.com/flatgeobuf/flatgeobuf/src/go@v0.0.0-20230914202020-25c11d75fe28
go: downloading github.com/flatgeobuf/flatgeobuf
v0.0.0-20230914202020-25c11d75fe28
go: downloading github.com/flatgeobuf/flatgeobuf/src/go
v0.0.0-20230914202020-25c11d75fe28
go: added github.com/flatgeobuf/flatgeobuf/src/go
v0.0.0-20230914202020-25c11d75fe28
go: added github.com/google/flatbuffers v22.11.23+incompatible

- sean


On Fri, Sep 15, 2023 at 4:35 PM Bruno Albuquerque <b...@gmail.com> wrote:

> So, I am still curious about something. Flatbuffers, which is a project I
> depend on, does have its go code in a subdirectory and I can go get it:
>
> ➜  ~ go get -x github.com/google/flatbuffers/go
> # get https://proxy.golang.org/github.com/@v/list
> # get https://proxy.golang.org/github.com/google/flatbuffers/@v/list
> # get https://proxy.golang.org/github.com/google/flatbuffers/go/@v/list
> # get https://proxy.golang.org/github.com/google/@v/list
> # get https://proxy.golang.org/github.com/@v/list: 404 Not Found (0.156s)
> # get https://proxy.golang.org/github.com/google/@v/list: 404 Not Found
> (0.230s)
> # get https://proxy.golang.org/github.com/google/flatbuffers/go/@v/list:
> 200 OK (0.236s)
> # get https://proxy.golang.org/github.com/google/flatbuffers/@v/list: 200
> OK (0.236s)
> # get https://proxy.golang.org/github.com/google/flatbuffers/go/@latest
> # get https://proxy.golang.org/github.com/google/flatbuffers/go/@latest:
> 404 Not Found (0.023s)
> go: added github.com/google/flatbuffers v23.5.26+incompatible
>
> As comparison, here is what I get for flatgeobuf:
>
> ➜  ~ go get -x github.com/flatgeobuf/flatgeobuf/go
> # get https://proxy.golang.org/github.com/@v/list
> # get https://proxy.golang.org/github.com/flatgeobuf/@v/list
> # get https://proxy.golang.org/github.com/flatgeobuf/flatgeobuf/@v/list
> # get https://proxy.golang.org/github.com/flatgeobuf/flatgeobuf/go/@v/list
> # get https://proxy.golang.org/github.com/@v/list: 404 Not Found (0.124s)
> # get https://proxy.golang.org/github.com/flatgeobuf/@v/list: 404 Not
> Found (0.126s)
> # get https://proxy.golang.org/github.com/flatgeobuf/flatgeobuf/@v/list:
> 200 OK (0.130s)
> # get https://proxy.golang.org/github.com/flatgeobuf/flatgeobuf/@latest
> # get https://proxy.golang.org/github.com/flatgeobuf/flatgeobuf/@latest:
> 200 OK (0.023s)
> # get https://proxy.golang.org/github.com/flatgeobuf/flatgeobuf/go/@v/list:
> 404 Not Found (4.152s)
> go: module github.com/flatgeobuf/flatgeobuf@upgrade found
> (v0.0.0-20230914202020-25c11d75fe28), but does not contain package
> github.com/flatgeobuf/flatgeobuf/go
>
> Is the difference simply that flatbuffers has an associated tag and
> flatgeobuf currently does not?
>
> While we are at it, I can not find the go.mod for flatbuffers! It is not
> in the root of the repository and also not inside the go subdir where the
> code resides. Is there some special casing for this project in place?
>
> -Bruno
>
> On Thu, Sep 14, 2023 at 5:58 PM Bruno Albuquerque <b...@gmail.com> wrote:
>
>> It is likely that I am doing something stupid but as I am out of ideas,
>> here goes nothing.
>>
>> I pushed an initial Go flatgeobuf implementation here:
>>
>> github.com/flatgeobuf/flatgeobuf/src/go
>>
>> This directory in the repository has a go.mod file with the following
>> contents:
>>
>> module github.com/flatgeobuf/flatgeobuf/src/go
>> go 1.20
>> require github.com/google/flatbuffers v22.11.23+incompatible
>>
>> Just in case it might be relevant, the actual repository is
>> github.com/flatgeobuf/flatgeobuf, src/go is a subdirectory there.
>>
>> If I try to use this module, it fails. For example:
>>
>> # go get -u github.com/flatgeobuf/flatgeobuf/src/go
>> go: downloading github.com/flatgeobuf/flatgeobuf
>> v0.0.0-20230914202020-25c11d75fe28
>> go: module github.com/flatgeobuf/flatgeobuf@upgrade found
>> (v0.0.0-20230914202020-25c11d75fe28), but does not contain package
>> github.com/flatgeobuf/flatgeobuf/src/go
>>
>> What am I missing?
>>
>> -Bruno
>>
>> --
> 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/CAEd86TwVCmcVBfKasTKYv804oJeJJ_dEoQ1SVPaJ2_nEhO0RUw%40mail.gmail.com
> <https://groups.google.com/d/msgid/golang-nuts/CAEd86TwVCmcVBfKasTKYv804oJeJJ_dEoQ1SVPaJ2_nEhO0RUw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAGabyPp%2BaNKujM6Hb-J7WF9EYQH2aMvaGrYjhhjxrqdgXjc_Yw%40mail.gmail.com.

Reply via email to