Code Monkey home page Code Monkey logo

Comments (9)

ialidzhikov avatar ialidzhikov commented on August 25, 2024 1

/cc @incu6us

from goimports-reviser.

ialidzhikov avatar ialidzhikov commented on August 25, 2024 1

Thank you @incu6us !

[email protected] resolves the issue.

from goimports-reviser.

incu6us avatar incu6us commented on August 25, 2024

@ialidzhikov try to use v3.4.4. And reopen the issue in case of a problem

from goimports-reviser.

ialidzhikov avatar ialidzhikov commented on August 25, 2024

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.

incu6us avatar incu6us commented on August 25, 2024

As I see in the official documentation(https://go.dev/doc/modules/gomod-ref#module-syntax) the version must have format like X.Y.
image

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.

ialidzhikov avatar ialidzhikov commented on August 25, 2024

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.

incu6us avatar incu6us commented on August 25, 2024

fixed with new version v3.4.5:

image

from goimports-reviser.

2048Nemo avatar 2048Nemo commented on August 25, 2024

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.

incu6us avatar incu6us commented on August 25, 2024

@2048Nemo update the tool to the latest version

from goimports-reviser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.