You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat 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() {
}
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?
The text was updated successfully, but these errors were encountered: