Skip to content

Commit 4de462e

Browse files
committed
clean up comments
1 parent fcb0791 commit 4de462e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Available Commands:
2727
help Help about any command
2828
ping Ping a Labrinth instance
2929
server Prepare a plain server environment
30-
update Update the server
30+
update Update the deployed modpack
3131
version Print version infos
3232
3333
Flags:
@@ -47,7 +47,7 @@ Use "mrpack-install [command] --help" for more information about a command.
4747

4848
#### modpack update
4949
```
50-
Use file's hash and compare,Update the config and mods file'
50+
Update the deployed modpacks config and mod files, creating backup files if necessary.'
5151
5252
Usage:
5353
mrpack-install update [flags]

‎cmd/update.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ func init() {
2020

2121
var updateCmd = &cobra.Command{
2222
Use: "update",
23-
Short: "Update the server",
24-
Long: `Use file's hash and compare,Update the config and mods file'`,
23+
Short: "Update the deployed modpack",
24+
Long: `Update the deployed modpacks config and mod files, creating backup files if necessary.'`,
2525
Run: func(cmd *cobra.Command, args []string) {
2626
if len(args) < 1 {
2727
err := cmd.Help()

‎update/update.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313

1414
type DetectList map[Path]util.DetectType
1515

16-
// PreDelete Three scenarios
17-
// 1.File does not exist Notice
18-
// 2.File exists but hash value does not match,Change the original file name to xxx.bak
16+
// PreDelete Three scenarios are possible:
17+
// 1.File does not exist notice
18+
// 2.File exists but hash value does not match, change the original file name to xxx.bak
1919
// 3.File exists and the hash value matches
2020
func PreDelete(deleteList *ModPackInfo, serverPath string) DetectList {
2121
detectType := make(DetectList, 10)
@@ -33,10 +33,10 @@ func PreDelete(deleteList *ModPackInfo, serverPath string) DetectList {
3333
return detectType
3434
}
3535

36-
// PreUpdate Three scenarios
36+
// PreUpdate Three scenarios are possible:
3737
// 1.File does not exist
38-
// 2.File exists but hash value does not match,Change the original file name to xxx.bak
39-
// 3.File exists and the hash value matches,Remove the item from the queue
38+
// 2.File exists but hash value does not match, change the original file name to xxx.bak
39+
// 3.File exists and the hash value matches, remove the item from the queue
4040
func PreUpdate(updateList *ModPackInfo, serverPath string) DetectList {
4141
detectType := make(DetectList, 10)
4242
for filePath := range updateList.File {
@@ -77,7 +77,7 @@ func ModPackDeleteDo(deleteList DetectList, serverPath string) error {
7777
}
7878

7979
func ModPackUpdateDo(updateList DetectList, updateFileInfo FileMap, serverPath string, modPackPath string, downloadPools *requester.DownloadPools) error {
80-
//backup file and download file in modrinth index
80+
// backup file and download file in modrinth index
8181
for filePath := range updateList {
8282
switch updateList[filePath] {
8383
case util.PathNoMatch:

0 commit comments

Comments
 (0)