mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
* Add base and loader command * Support updating to latest * Support explicit fabric versions * Support explicit Forge version * Support quilt * Add support for updating Minecraft * Add support for Forge recommended * Fix Forge version sorting * Various fixes * Add documentation to the use * More suggestions
17 lines
374 B
Go
17 lines
374 B
Go
package cmdshared
|
|
|
|
import "strings"
|
|
|
|
func GetRawForgeVersion(version string) string {
|
|
var wantedVersion string
|
|
// Check if we have a "-" in the version
|
|
if strings.Contains(version, "-") {
|
|
// We have a mcVersion-loaderVersion format
|
|
// Strip the mcVersion
|
|
wantedVersion = strings.Split(version, "-")[1]
|
|
} else {
|
|
wantedVersion = version
|
|
}
|
|
return wantedVersion
|
|
}
|