skilld-labs / go-odoo

Golang wrapper for Odoo API
Apache License 2.0
86 stars 61 forks source link

update for go1.16 #28

Open sivan-koren opened 3 years ago

sivan-koren commented 3 years ago

This is a really great project. Thank you for this!

With go1.16 old style modules are being deprecated (to be removed completely in 1.17 according to the blog).

From the instructions, "go generate" will not work because github.com/skilld-labs/go-odoo will not exist.

The instructions should be updated to reflect that.

Great work!

ahuret commented 3 years ago

Hi @sivan-koren !

First, thanks a lot for using this projet and for giving feedbacks ! :D

With go1.16 old style modules are being deprecated

I'm not sure to understand what you mean by "old style modules", are you about GOPATH ?

I think go-odoo need some love to redesign the way to generate models. Actually, as is, the generator + README's instructions works only with GOPATH enable.

If you have any idea, please share :-) I'll think about it soon (after my vacations next week), and I'll propose some rework !

ahuret commented 3 years ago

I've updated README to prevent about GOPATH usage: see https://github.com/skilld-labs/go-odoo/commit/e9a6cf65db32e8bf1f61b3a08fcf5782ed348aee

sivan-koren commented 3 years ago

Yes, that is what I meant.

As of yesterday, updating to 1.16 requires: "go env -w GO111MODULE=off" and only then run "go get."

ahuret commented 1 year ago

related https://github.com/skilld-labs/go-odoo/issues/32#issuecomment-1221077094