func (d *DependencyLock) FileExt() string {
	ending := ".jar"
	if d.Type == DependencyLockTypeModpack {
		ending = ".zip"
	}
	return ending
}
FileExt returns ".jar" for mods and ".zip" for modpacks
package manifest
import (
	"bytes"
	"crypto/sha256"
	"errors"
	"fmt"
	"log"
	"github.com/pelletier/go-toml"
)
const LockfileVersion = 1
var (
	ErrDependencyConflicts = errors.New("a dependency with that name is already present")
	DependencyLockTypeMod = "mod"
	DependencyLockTypeModpack = "modpack"
	PlatformFabric  = "fabric"
	PlatformForge   = "forge"
	PlatformVanilla = "vanilla"
)
type PlatformLock interface {
	PlatformName() string
	MinecraftVersion() string
	PlatformVersion() string
}
type Lockfile struct {
	LockfileVersion int                        `toml:"lockfileVersion" json:"lockfileVersion"`
	Fabric          *FabricLock                `toml:"fabric,omitempty" json:"fabric,omitempty"`
	Forge           *ForgeLock                 `toml:"forge,omitempty" json:"forge,omitempty"`
	Vanilla         *VanillaLock               `toml:"vanilla,omitempty" json:"vanilla,omitempty"`
	Dependencies    map[string]*DependencyLock `toml:"dependencies,omitempty" json:"dependencies,omitempty"`
}
type FabricLock struct {
	Minecraft    string `toml:"minecraft" json:"minecraft"`
	FabricLoader string `toml:"fabricLoader" json:"fabricLoader"`
	Mapping      string `toml:"mapping" json:"mapping"`
}
func (f *FabricLock) PlatformName() string { return "fabric" }
func (f *FabricLock) MinecraftVersion() string { return f.Minecraft }
func (f *FabricLock) PlatformVersion() string { return f.FabricLoader }
type VanillaLock struct {
	Minecraft string `toml:"minecraft" json:"minecraft"`
}
func (v *VanillaLock) PlatformName() string { return "vanilla" }
func (v *VanillaLock) MinecraftVersion() string { return v.Minecraft }
func (f *VanillaLock) PlatformVersion() string { return "" }
type ForgeLock struct {
	Minecraft   string `toml:"minecraft" json:"minecraft"`
	ForgeLoader string `toml:"forgeLoader" json:"forgeLoader"`
}
func (f *ForgeLock) PlatformName() string { return "forge" }
func (f *ForgeLock) MinecraftVersion() string { return f.Minecraft }
func (f *ForgeLock) PlatformVersion() string { return f.ForgeLoader }
type DependencyLock struct {
	Name     string `toml:"name" json:"name"`
	Version  string `toml:"version" json:"version"`
	Type     string `toml:"type" json:"type"`
	IPFSHash string `toml:"ipfsHash" json:"ipfsHash"`
	Sha256   string `toml:"Sha256" json:"Sha256"`
	URL      string `toml:"url" json:"url"`
	Provider string `toml:"provider" json:"provider"`
	Dependend string `toml:"dependend" json:"dependend"`
	IsDev bool `toml:"isDev,omitempty" json:"isDev,omitempty"`
}