Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Vendoring, Go list failed #34818

Closed
Mohitp98 opened this issue Oct 10, 2019 · 2 comments
Closed

Inconsistent Vendoring, Go list failed #34818

Mohitp98 opened this issue Oct 10, 2019 · 2 comments

Comments

@Mohitp98
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.13.1 linux/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/gslab/.cache/go-build"
GOENV="/home/gslab/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/gslab/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/gslab/terra:/usr/local/go/bin:/home/gslab/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build889549718=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I'm working on Github Api's with Go,

Code is as follow ---->
package main

import (
"context"
"fmt"
"os"
"github.com/google/go-github/github"
"golang.org/x/oauth2"
)

type Package1 struct {
FullName string
Description string
ForksCount int
}

func main() {

ctx := context.Background()
ts := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: os.Getenv("Github_Token")})

tc := oauth2.NewClient(ctx, ts)

client := github.NewClient(tc)

//list all repos for authenticated user
repos, _, err := client.Repositories.Get(ctx, "Mohitp98", "Appin2018")
//fmt.Println(os.Getenv("Github_Token"))

if err != nil {
	fmt.Printf("Problem occured while getting info %v \n", err)
	os.Exit(1)
}

pack := &Package1{
	FullName:    *repos.FullName,
	Description: *repos.Description,
	ForksCount:  *repos.ForksCount,

}

fmt.Printf("%v\n", pack)

}

ERROR --->

go list failed on /usr/local/go/src/runtime: go: inconsistent vendoring in /usr/local/go/src:
go.mod requires github.com/google/go-github v17.0.0+incompatible but vendor/modules.txt does not include it.
run 'go mod tidy; go mod vendor' to sync

What did you expect to see?

What did you see instead?

@bcmills
Copy link
Contributor

bcmills commented Oct 10, 2019

See #34657 (comment).

Please also ensure that when you file an issue, you run go env from the same working directory as the go command that produced the error.

@bcmills
Copy link
Contributor

bcmills commented Oct 10, 2019

Duplicate of #34657

@bcmills bcmills marked this as a duplicate of #34657 Oct 10, 2019
@bcmills bcmills closed this as completed Oct 10, 2019
@golang golang locked and limited conversation to collaborators Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants