Comments (9)
/cc @incu6us
from goimports-reviser.
Thank you @incu6us !
[email protected] resolves the issue.
from goimports-reviser.
@ialidzhikov try to use v3.4.4. And reopen the issue in case of a problem
from goimports-reviser.
I see that v3.4.4 includes #133. which only bumps the go version for the project.
The issue report is about the cases when you run goimports-reviser
against a module with go version directive in format X.Y.Z
. For example
module github.com/foo/bar
go 1.21.0
goimports-reviser
still fails with:
go.mod:3: invalid go version '1.21.0': must match format 1.23
Usage of goimports-reviser:
<Usage text is omitted>
Let me know if you need more detailed steps to reproduce.
And reopen the issue in case of a problem
When a maintainer closes an issue, the reporter cannot open it. Can you please reopen it?
from goimports-reviser.
As I see in the official documentation(https://go.dev/doc/modules/gomod-ref#module-syntax) the version must have format like X.Y
.
Mentioned error message telling you that you are using wrong format(...must match format 1.23
). So, in your case the string should be go 1.21
from goimports-reviser.
See https://go.dev/doc/toolchain#version:
Before Go 1.21, the initial release of a Go toolchain was version 1.N, not 1.N.0, so for N < 21, the ordering is adjusted to place 1.N after the release candidates.
You can also check all the comments in golang/go#62278. My understanding is that with go1.21 the expect format is go X.Y.Z
and go X.Y
refers to a development version of the X.Y
version. So, goimports-reviser
has to definitely support the go X.Y.Z
format.
from goimports-reviser.
fixed with new version v3.4.5
:
![image](https://private-user-images.githubusercontent.com/7884395/266601541-5c1b63a5-52cf-4c12-b189-58eb62e38331.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk4NzAyNDksIm5iZiI6MTcwOTg2OTk0OSwicGF0aCI6Ii83ODg0Mzk1LzI2NjYwMTU0MS01YzFiNjNhNS01MmNmLTRjMTItYjE4OS01OGViNjJlMzgzMzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDMwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAzMDhUMDM1MjI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzJkZDlhMTAzNWNlNzg4MzFhODU5OGNiZjlkOGViYjE3ZTEyMTYyNmIyOTY3ZjU4MTQ0MzkxM2FlZDgzNGJiMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.KrHIb8JC68p4gLS4Uh4poQV_7dvW5K1yhgGP8kni_Dc)
from goimports-reviser.
I'm also having this issue, but I regenerated a go.mod file via go mod init XXXX
, the original go.mod file was generated in vscode, but I ran into problems opening it in goland
from goimports-reviser.
@2048Nemo update the tool to the latest version
from goimports-reviser.
Related Issues (20)
- Cannot sort imports correctly in some case
- Add "dotted" and "blank" imports to imports order HOT 1
- Get rid of deprecated dependency github.com/pkg/errors HOT 1
- goimports-reviser not importing and undoing on save HOT 6
- Add ability to add named imports in a separate group HOT 1
- Getting error in formatting HOT 16
- not support ./... in m1 mac HOT 2
- error message in go version 1.21.0 HOT 1
- Exclude vendor HOT 2
- Support Github Action HOT 2
- go.mod toolchain error HOT 6
- go command required, not found HOT 19
- `list-diff` flag is not work when a recursive path (./...) is given HOT 2
- Single import becomes a list of imports HOT 5
- import that contains project name inside (not starts from it) moves to project group
- Request for support with VSCode configuration HOT 2
- Have you considered using gofumpt for fmt operation ?
- gRPC version higher than v1.59 failed
- Allow specifying multiple files as arguments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goimports-reviser.