LoginSignup
1
0

More than 1 year has passed since last update.

goでバージョンアップしたときにはまったことメモ

Posted at

やったこと

  • 1.13.8 → 1.16.4
  • go modを使うようにした
  • go envを使うようにした

はまったこと

go modへ移行したときにパッケージの依存性

1.16系へのバージョンアップ

こんなのがでるように

~/A/go ❯ (develop) go mod tidy                          241ms  Sun Jun  6 19:20:53 2021
m imports
        github.com/labstack/echo-contrib/session imports
        github.com/labstack/echo/v4/middleware tested by
        github.com/labstack/echo/v4/middleware.test imports
        io/fs: malformed module path "io/fs": missing dot in first path element
m imports
        github.com/labstack/echo-contrib/session imports
        github.com/labstack/echo/v4/middleware tested by
        github.com/labstack/echo/v4/middleware.test imports
        testing/fstest: malformed module path "testing/fstest": missing dot in first path element

原因

  • go envが切り替わってなかったこと
  • import指定するパッケージのパスを変える必要があった
echoパッケージ
before
    "github.com/labstack/echo/"
    "github.com/labstack/echo-contrib/session"
    "github.com/labstack/echo//middleware"
after
    "github.com/labstack/echo/v4"
    "github.com/labstack/echo-contrib/session"
    "github.com/labstack/echo/v4/middleware"
oidcパッケージ
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0