deb-sig / double-entry-generator

Rule-based double-entry bookkeeping importer (from Alipay/WeChat/Huobi etc. to Beancount/Ledger).
https://github.com/deb-sig/double-entry-generator
Apache License 2.0
529 stars 79 forks source link

Go module compatibility #130

Open lujiajing1126 opened 3 months ago

lujiajing1126 commented 3 months ago

Describe the bug

With Go install command

$ go install github.com/deb-sig/double-entry-generator@v2.6.0
go: github.com/deb-sig/double-entry-generator@v2.6.0: github.com/deb-sig/double-entry-generator@v2.6.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/deb-sig/double-entry-generator/v2")

Additional context

To preserve import compatibility, the go command requires that modules with major version v2 or later use a module path with that major version as the final element. For example, version v2.0.0 of example.com/m must instead use module path example.com/m/v2, and packages in that module would use that path as their import path prefix, as in example.com/m/v2/sub/pkg.

https://github.com/grafana/loki/issues/2826

Triple-Z commented 3 months ago

@gaocegege FYI

gaocegege commented 3 months ago

Which golang version are you using?

lujiajing1126 commented 3 months ago

Which golang version are you using?

1.22

gaocegege commented 3 months ago

You can download the binary from https://github.com/deb-sig/double-entry-generator/releases/tag/v2.6.0.

It requires some time to refactor the code.

gaocegege commented 3 months ago

Current behaviour:


go install github.com/deb-sig/double-entry-generator@latest
go: downloading github.com/deb-sig/double-entry-generator v1.7.0