LoginSignup
1
0

More than 3 years have passed since last update.

Go Modulesで依存packageのversionを上書きする方法

Posted at

概要

go buildをファイル更新時にホットリロードするためrealizeを使いたかったけど、realizeが依存しているpackageに破壊的変更があってビルドエラーになっていた。

package管理にはgo Modulesを使っていてdepでいう[override]する方法を検索したらgo.modにreplaceのディレクティブを指定し、versionを置き換える事ができるようだった。

go.mod

 require (
    // something package
 )

 replace (
    github.com/go-siris/siris => github.com/go-siris/siris v7.3.4+incompatible
 )

公式ドキュメント

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