Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
55 views
in Technique[技术] by (71.8m points)

How to update a go dependency with different module name than src path?

  • The location: github.com/elastic/beats
  • The mod file: github.com/elastic/beats/go.mod
  • The module name: github.com/elastic/beats/v7
  • The tag: v7.10.2

What LoTR incantation of go get to I have to run to get a little dependency update action?

question from:https://stackoverflow.com/questions/65830463/how-to-update-a-go-dependency-with-different-module-name-than-src-path

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This will update to latest minor.patch version of v7:

go get github.com/elastic/beats/v7

or if you want a specific version to update/downgrade to:

go get github.com/elastic/beats/[email protected]

Adding the -u flag will additionally update the dependencies of github.com/elastic/beats/v7:

go get -u github.com/elastic/beats/v7


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...