-1

我正在尝试下载“github.com/99designs/gqlgen”包。我想将它用作包而不是模块。我只想在 graphql 中启动新服务。但是当我尝试下载“github.com/99designs/gqlgen”包时,我收到以下错误:

go: github.com/russross/blackfriday/v2@v2.0.1 用于两个不同的模块路径(github.com/russross/blackfriday/v2 和 gopkg.in/russross/blackfriday.v2)

我的 go.mod 文件中有以下内容替换 gopkg.in/russross/blackfriday.v2 => github.com/russross/blackfriday/v2 v2.0.1

仍然得到同样的错误。

以下是 go.mod

go 1.14

require (
    github.com/Masterminds/goutils v1.1.0 // indirect
    github.com/Masterminds/semver v1.4.2 // indirect
    github.com/Masterminds/sprig v2.18.0+incompatible // indirect
    github.com/VividCortex/gohistogram v1.0.0 // indirect
    github.com/crewjam/saml v0.4.1
    github.com/ctessum/macreader v0.0.0-20151005232333-d4ef8112dbfa
    github.com/dchest/authcookie v0.0.0-20120917135355-fbdef6e99866 // indirect
    github.com/dchest/passwordreset v0.0.0-20120723102225-642cf836ac8d
    github.com/deckarep/golang-set v1.7.1
    github.com/dgrijalva/jwt-go v3.2.0+incompatible
    github.com/di-wu/scim-filter-parser v0.0.0-20200731092905-86ddcb7e62bd
    github.com/dsnet/compress v0.0.1 // indirect
    github.com/educlos/testrail v0.0.0-20190518160002-488f9e3f1948
    github.com/elimity-com/scim v0.0.0-20200812064407-285be4a1157f
    github.com/ggwhite/go-masker v1.0.4
    github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
    github.com/go-ini/ini v1.42.0 // indirect
    github.com/go-kit/kit v0.8.0
    github.com/go-sql-driver/mysql v1.4.1
    github.com/golang/snappy v0.0.1 // indirect
    github.com/google/go-github v17.0.0+incompatible
    github.com/google/go-querystring v1.0.0 // indirect
    github.com/google/uuid v1.1.1
    github.com/gorilla/context v1.1.1
    github.com/gorilla/handlers v1.4.0
    github.com/gorilla/mux v1.7.2
    github.com/gorilla/websocket v1.4.0
    github.com/huandu/xstrings v1.2.0 // indirect
    github.com/imdario/mergo v0.3.7 // indirect
    github.com/jasonlvhit/gocron v0.0.0-20190603000501-f1cf2bd73e84
    github.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43 // indirect
    github.com/jmoiron/sqlx v1.2.0
    github.com/lib/pq v1.1.1
    github.com/matcornic/hermes v1.2.0
    github.com/mattn/go-runewidth v0.0.4 // indirect
    github.com/mholt/archiver v3.1.1+incompatible
    github.com/minio/minio-go v6.0.14+incompatible
    github.com/mitchellh/go-homedir v1.1.0 // indirect
    github.com/natefinch/lumberjack v2.0.0+incompatible
    github.com/nats-io/gnatsd v1.4.1 // indirect
    github.com/nats-io/go-nats v1.7.2
    github.com/nats-io/nkeys v0.0.2 // indirect
    github.com/nats-io/nuid v1.0.1 // indirect
    github.com/nwaples/rardecode v1.0.0 // indirect
    github.com/olekukonko/tablewriter v0.0.1 // indirect
    github.com/pierrec/lz4 v2.0.5+incompatible // indirect
    github.com/pkg/errors v0.8.1
    github.com/prometheus/client_golang v0.9.4
    github.com/prometheus/common v0.4.1
    github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7
    github.com/sendgrid/rest v2.4.1+incompatible // indirect
    github.com/sendgrid/sendgrid-go v3.4.1+incompatible
    github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
    github.com/sirupsen/logrus v1.4.2
    github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
    github.com/spf13/viper v1.4.0
    github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
    github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271
    github.com/tealeg/xlsx v1.0.3
    github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
    github.com/vjeantet/jodaTime v0.0.0-20170816150230-be924ce213fb
    github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
    github.com/zebresel-com/mongodm v2.0.1+incompatible
    golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392
    golang.org/x/net v0.0.0-20190522155817-f3200d17e092
    golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
    gopkg.in/ini.v1 v1.42.0 // indirect
    gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce
    gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
    gopkg.in/russross/blackfriday.v2 v2.0.1 // indirect
)

replace gopkg.in/russross/blackfriday.v2 => github.com/russross/blackfriday/v2 v2.0.1
4

1 回答 1

0

目前没有直接的解决方案。如评论中所述,https://github.com/golang/go/issues/26904指出了这个问题。

您可以尝试说服软件包用户使用新的github.com/russross/blackfriday v2.1.0. 这是 blackfriday 的新规范包路径,如此处所述

于 2021-01-13T09:36:59.230 回答