-1

I have go.mod file, with require, one of them if github.com/mattermost/mattermost-server v5.11.1+incompatible but there is a new version of library in github, 5.17.1.

I download latest version and work with it, but when i run go mod init my go.mod contains 5.11.1+incompatible version.

How do I configure the go.mod files to use the latest version ?

godvlpr
  • 141
  • 1
  • 3
  • 11

2 Answers2

0

use replace in go.mod

replace github.com/mattermost/mattermost-server v5.11.1+incompatible => github.com/mattermost/mattermost-server v5.17.1
Mayank
  • 5,411
  • 1
  • 16
  • 16
  • Nope, it didn't work, now i fixed this. I use mattermost-server and trouble was in that library, i wrote to mattermost dev. team, and they said that they know aboute this bug, and i need to use version 0.0.0 – godvlpr Nov 28 '19 at 09:20
0

First of all prune the no-more-necessart dependencies using go mod tidy. Now, update all direct and indirect packages to the latest (minor) version with go get -u ./... where the go.mod file is located.

alessiosavi
  • 2,753
  • 2
  • 19
  • 38