Code Monkey home page Code Monkey logo

Comments (7)

alicebob avatar alicebob commented on May 25, 2024 1

The v2 comes from the new Go modules system, introduced in Go 1.11(?).

Since you use an older Go which doesn't support modules I would suggest using release https://github.com/alicebob/miniredis/tree/v2.7.0 which is the latest which should work for you. Thatone doesn't have the 'v2' directory.

from miniredis.

alicebob avatar alicebob commented on May 25, 2024

hi,

If I import it with:

import (
    "github.com/alicebob/miniredis/v2"
)

it works fine for me. Are you using an older Go version?

from miniredis.

veenanr avatar veenanr commented on May 25, 2024

We are using 1.9.2 version of go

from miniredis.

veenanr avatar veenanr commented on May 25, 2024

Here is our travis build failures -

$ travis_setup_go
go version go1.9 linux/amd64
$ export GOPATH="/home/travis/gopath"
$ export PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.9.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin"
$ export GO111MODULE="auto"
$ gimme version
v1.5.3
$ go version
go version go1.9 linux/amd64
go.env
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GORACE=""
GOROOT="/home/travis/.gimme/versions/go1.9.linux.amd64"
GOTOOLDIR="/home/travis/.gimme/versions/go1.9.linux.amd64/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build097183874=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
before_install
0.00s$ echo -e '[url "[email protected]:"]\n    insteadOf = https://github.ibm.com/' > ~/.gitconfig
38.98s$ go get -t $(go list)
package github.com/alicebob/miniredis/v2/server: cannot find package "github.com/alicebob/miniredis/v2/server" in any of:
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/github.com/alicebob/miniredis/v2/server (from $GOROOT)
	/home/travis/gopath/src/github.com/alicebob/miniredis/v2/server (from $GOPATH)

from miniredis.

veenanr avatar veenanr commented on May 25, 2024

Also, if you look at github.com/alicebob/miniredis there is no v2 folder.

from miniredis.

greyireland avatar greyireland commented on May 25, 2024

@alicebob Everyone ask this questions why not backward compatibility? Its a real trouble. Can you support compatibility with v2.7.0 ? Thanks ~

from miniredis.

alicebob avatar alicebob commented on May 25, 2024

@greyireland: it seems like the easiest thing to do is to move everything over to a /v2/ directory, as described in point 2 in https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Thoughts?

from miniredis.

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.