Initial command system

This commit is contained in:
comp500
2019-03-17 15:04:00 +00:00
parent 63df728f42
commit a531e36713
9 changed files with 170 additions and 0 deletions

15
core/resolve.go Normal file
View File

@@ -0,0 +1,15 @@
package core
import (
"path/filepath"
"strings"
)
// ModExtension is the file extension of the mod metadata files
const ModExtension = ".toml"
// ResolveMod returns the path to a mod file from it's name
func ResolveMod(modName string, flags Flags) string {
fileName := strings.ToLower(strings.TrimSuffix(modName, ModExtension)) + ModExtension
return filepath.Join(flags.ModsFolder, fileName)
}