V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
OpenYanxi
V2EX  ›  Go 编程语言

请教这个报错 : [email protected]/fileutil.go:12:2: package io/fs is not in GOROOT

  •  
  •   OpenYanxi · 1 天前 · 387 次点击

    使用的该库一致的 go1.14 版本

    运行的这个文件:

    https://github.com/qiniu/go-sdk/blob/master/examples/create_uptoken.go

    报错是: ../.goPath/pkg/mod/modernc.org/[email protected]/fileutil.go:12:2: package io/fs is not in GOROOT (.../1.14.15/src/io/fs)

    Google 了,也 kimi 了,没弄明白。 请教社区大神

    4 条回复    2024-09-20 19:20:41 +08:00
    setsunakute
        1
    setsunakute  
       1 天前
    io/fs 这个包是 golang 1.16 才有的, 升级一下 golang 版本
    crackidz
        2
    crackidz  
       1 天前
    你的 Go 版本太低了
    bv
        3
    bv  
       1 天前
    OpenYanxi
        4
    OpenYanxi  
    OP
       23 小时 27 分钟前
    明白啦~ 感谢各位大佬

    顺便吐槽下这个最新的这个 7.22 的发布, 咋通过 ci-test 的各个 go 版本的测试的...

    https://github.com/qiniu/go-sdk/commit/e972184aab66706a12a2c6fd190b441739c7df9d
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2391 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 10:48 · PVG 18:48 · LAX 03:48 · JFK 06:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.