mirror of
https://github.com/packwiz/packwiz.git
synced 2026-02-19 19:00:37 +01:00
Version fetching refactoring (#373)
* Put modloader version data in struct for legibility * Create modloader map from list This is a minor change, but it prevents any errors with the keys not being equal to the modloader's Name field * Less anonymous functions in modloader version retrieval With previous code, almost everything was lazy and returned a function. Changed this to only have anonymous function in the modloader definitions, and the rest of the functions all just execute their results immediately instead or returning a function. Makes for a bit more legible code. * Simplify FetchMavenVersionFiltered * Rewrite version retrieval * Use Errorf in versionutil * Remove httpclient parameter turned out not to be needed * Add testing for version retrieval * Explain fetchMavenWithFilterMap
This commit is contained in:
1
go.mod
1
go.mod
@@ -39,6 +39,7 @@ require (
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jarcoal/httpmock v1.4.1
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/sagikazarmark/locafero v0.7.0 // indirect
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user