Why am I getting a \'go: gopkg.in/DATA-DOG/[email protected]: go.mod has non-....v1 module path\' error when retrieving the fzf development branch with GO111MODULE=on?

Patricia Arquette
Release: 2024-10-30 13:24:27
Original
622 people have browsed it

Why am I getting a

Module Loading Error in GO111MODULE=On Mode

When attempting to retrieve the development branch of the fzf package with GO111MODULE=on, an error occurs:

go: gopkg.in/DATA-DOG/[email protected]: go.mod has non-....v1 module path "github.com/DATA-DOG/go-sqlmock" at revision v1.3.3
go get: error loading module requirements
Copy after login

Analysis:

The problem stems from a dependency of fzf, namely github.com/gdamore/tcell, which itself depends on gopkg.in/DATA-DOG/go-sqlmock.v1. In version 1.3.3 of go-sqlmock, go modules were introduced without version suffixes. However, explicit version specification is no longer supported.

Solution:

To resolve the issue and retrieve the development branch without updating dependencies, use go get github.com/junegunn/fzf without the -u flag:

go get github.com/junegunn/fzf
Copy after login

Alternatively, you can manually update gopkg.in/DATA-DOG/go-sqlmock.v1 by running:

go get gopkg.in/DATA-DOG/go-sqlmock.v1
Copy after login

Note that this will also update the dependencies of fzf, so use this option cautiously if you don't want to alter the package's current dependency tree.

Additional Information:

This issue is currently being addressed in a pull request for the tcell repository: https://github.com/gdamore/tcell/pull/267

The above is the detailed content of Why am I getting a \'go: gopkg.in/DATA-DOG/[email protected]: go.mod has non-....v1 module path\' error when retrieving the fzf development branch with GO111MODULE=on?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!