Documentation
¶
Overview ¶
Package get provides functionality for getting mods and their files based on user input.
Copyright © 2021 Matthew Champagne <mmchamp95@gmail.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func AllMods(version string) ([]mcf.Mod, error)
- func AllModsBySlug(version string) (map[string]*mcf.Mod, error)
- func LatestFileByID(version string, id uint, name string) (*mcf.ModFile, error)
- func LatestFileByMod(version string, mod *mcf.Mod) (*mcf.ModFile, error)
- func LatestFileForEachArg(args []string, version string, cb LatestFileCallback) error
- func LatestFileForEachMod(mods []mcf.Mod, version string, cb LatestFileCallback) error
- func ModsByArgs(args []string, version string) ([]mcf.Mod, error)
- func ModsBySlug(slugs []string, version string) ([]mcf.Mod, error)
- type LatestFileCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllModsBySlug ¶
AllModsBySlug returns all mods for a given Minecraft version mapped by their slugs.
func LatestFileByID ¶
LatestFileByID returns the latest mod file for a mod's ID and a Minecraft version.
func LatestFileByMod ¶
LatestFileByMod returns the latest mod file for a mod and an optional Minecraft version.
func LatestFileForEachArg ¶
func LatestFileForEachArg(args []string, version string, cb LatestFileCallback) error
LatestFileForEachArg concurrently calls cb with the latest file for each id or slug argument and the given Minecraft version.
func LatestFileForEachMod ¶
func LatestFileForEachMod(mods []mcf.Mod, version string, cb LatestFileCallback) error
LatestFileForEachMod concurrently calls cb with the latest file for each mod and the given Minecraft version.
func ModsByArgs ¶
ModsByArgs returns all mods for some given arguments and a Minecraft version.