dijkstra
dijkstra copied to clipboard
Update to v2.0.0
Hi! How to upgrade to v2.0.0 properly? https://go.dev/doc/modules/version-numbers
PS D:\projects\***\third_party> go get -v -u github.com/RyanCarrier/[email protected]
go: github.com/RyanCarrier/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/RyanCarrier/dijkstra/v2")
Sorry mate havn't done a go major package upgrade before, think it's ok now but will leave this open and have better look when I get a chance
$ go get github.com/RyanCarrier/dijkstra/v2
go: downloading github.com/RyanCarrier/dijkstra/v2 v2.0.1
Sorry mate havn't done a go major package upgrade before, think it's ok now but will leave this open and have better look when I get a chance
$ go get github.com/RyanCarrier/dijkstra/v2 go: downloading github.com/RyanCarrier/dijkstra/v2 v2.0.1
PS D:\projects\***\third_party> go get -u github.com/RyanCarrier/[email protected]
go: github.com/RyanCarrier/[email protected]: invalid version: go.mod has post-v2 module path "github.com/RyanCarrier/dijkstra/v2" at revision v2.0.1
PS D:\projects\***\third_party>
require (
github.com/LeKovr/num2word v0.0.0-20230222121907-fcf7ab10b131
github.com/RyanCarrier/dijkstra v2.0.1
github.com/bluele/gcache v0.0.2
github.com/bnkamalesh/currency v1.1.0
)
D:\projects\***>make.exe build
go build -ldflags "-X ***/cmd/server.Version=v.1.0.0-beta.8#cc8c92e8" -o ./bin/online/app ./cmd/app
go: errors parsing go.mod:
go.mod:9:2: require github.com/RyanCarrier/dijkstra: version "v2.0.1" invalid: should be v0 or v1, not v2
make: *** [Makefile:16: build] Error 1
Process finished with exit code 2
I managed to force the update, now I have questions about working correctly with Mapped Graph...
for example: Where is an analogue of GetMapped(), GetMapping()?
For the new mapping, you should just be able to use the mapped graph with generics and there is no need for those methods anymore :)
under the hood it still does mapping back to sequential int's, but with generics it doesn't need to be exposed
Для нового сопоставления вы должны иметь возможность использовать сопоставленный граф с дженериками, и в этих методах больше нет необходимости :)
под капотом он по-прежнему отображает последовательные целые числа, но с помощью дженериков его не нужно раскрывать
Для нового сопоставления вы должны иметь возможность использовать сопоставленный граф с дженериками, и в этих методах больше нет необходимости :)
под капотом он по-прежнему отображает последовательные целые числа, но с помощью дженериков его не нужно раскрывать
Let's try to figure it out, apparently we did something wrong. Thank you!
All good mate, updated the readme and point the docs to v2 also, let me know if issues