diff options
Diffstat (limited to 'steam-export-cli.go')
| -rw-r--r-- | steam-export-cli.go | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/steam-export-cli.go b/steam-export-cli.go index 5f5a0ca..e738fa9 100644 --- a/steam-export-cli.go +++ b/steam-export-cli.go @@ -13,8 +13,7 @@ import ( var ( errorHandling flag.ErrorHandling = flag.ExitOnError - defaultLib string = `C:\Program Files (x86)\Steam\steamapps` - steamLib *steam.Library = &steam.Library{} + steamLib *steam.Library = &steam.Library{} ) func parseArgs(args []string) error { @@ -54,10 +53,10 @@ Subcommands: func listGames(args []string) error { fl := flag.NewFlagSet("list", errorHandling) - lib := fl.String("l", defaultLib, + lib := fl.String("l", steam.DefaultLib, "Path to library in question. All the way to the 'steamapps' folder") - l := defaultLib + l := steam.DefaultLib fl.Parse(args) if fl.Parsed() { l = string(*lib) @@ -74,7 +73,7 @@ func listGames(args []string) error { func packageGame(args []string) error { fl := flag.NewFlagSet("package", errorHandling) - lib := fl.String("l", defaultLib, + lib := fl.String("l", steam.DefaultLib, "Path to library in question. All the way to the 'steamapps' folder") fileName := fl.String("f", "export", "Name of the archive file to be created. Please do not include the file extension") @@ -82,7 +81,7 @@ func packageGame(args []string) error { "Index of the game to be exported. Please see `list` for the index") var g int - l := defaultLib + l := steam.DefaultLib fl.Parse(args) if fl.Parsed() { l = string(*lib) @@ -107,12 +106,12 @@ func packageGame(args []string) error { func extractGame(args []string) error { fl := flag.NewFlagSet("extract", errorHandling) - lib := fl.String("l", defaultLib, + lib := fl.String("l", steam.DefaultLib, "Path to library in question. All the way to the 'steamapps' folder") fileName := fl.String("f", "", "Name of the archive file to be extracted. Please include the file extension") - l := defaultLib + l := steam.DefaultLib fl.Parse(args) if fl.Parsed() { l = string(*lib) @@ -132,13 +131,13 @@ func extractGame(args []string) error { func deleteGame(args []string) error { fl := flag.NewFlagSet("delete", errorHandling) - lib := fl.String("l", defaultLib, + lib := fl.String("l", steam.DefaultLib, "Path to library in question. All the way to the 'steamapps' folder") game := fl.Int("g", -1, "Index of the game to be deleted. Please see `list` for the index") var g int - l := defaultLib + l := steam.DefaultLib fl.Parse(args) if fl.Parsed() { l = string(*lib) @@ -162,7 +161,7 @@ func main() { fmt.Println(err) } else { if config.DefaultRepository != "" { - defaultLib = config.DefaultRepository + steam.DefaultLib = config.DefaultRepository } } |
