vps交流

来个会golang吴彦祖,有个库下载不了


https://github.com/crawlab-team/crawlab-sdk

  1. package main
  2. import (
  3.         "time"
  4.         sdk "github.com/crawlab-team/crawlab-sdk"
  5.         "github.com/crawlab-team/crawlab-sdk/entity"
  6. )
  7. func main() {
  8.         item := entity.Result{
  9.                 "hello": "world",
  10.         }
  11.         sdk.SaveItem(item)
  12.         time.Sleep(5 * time.Second)
  13. }

复制代码

这个库 tidy 的出错

  1. PS D:workspacegolangspiderceshi> go mod tidy
  2. go: finding module for package github.com/crawlab-team/crawlab-sdk/entity
  3. go: finding module for package github.com/crawlab-team/crawlab-sdk
  4. ceshi imports
  5.         github.com/crawlab-team/crawlab-sdk: module github.com/crawlab-team/[email protected] found (v0.3.2), but does not contain package github.com/crawlab-team/crawlab-sdk
  6. ceshi imports
  7.         github.com/crawlab-team/crawlab-sdk/entity: module github.com/crawlab-team/[email protected] found (v0.3.2), but does not contain package github.com/crawlab-team/crawlab-sdk/entity

复制代码

绑定,不会,交给楼下
难道是go版本的问题?楼主本地go 什么版本
设个环境变量GOPROXY
我是吴彦祖,可是我帮不了你

akkba 发表于 2021-12-7 17:35
难道是go版本的问题?楼主本地go 什么版本

1.17  你们能下载?

lingfeng 发表于 2021-12-7 17:36
设个环境变量GOPROXY

是下载问题     不应该直接 tidy就能下载来吗

你能打开entity这个目录? 明显就是压根没有这玩意  

lingfeng 发表于 2021-12-7 17:36
设个环境变量GOPROXY

他这个tidy的时候  错误意思我不理解

感觉是模块问题,我用的低版本的也报错