Remove bad code from 13-year-old me

This commit is contained in:
2020-11-25 20:18:52 -08:00
parent 027d1bf6f9
commit c9d3b583f4
5 changed files with 289 additions and 301 deletions

28
usage.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"fmt"
"strings"
)
// Print help screen
func printHelpMessage(packageManagerCommand string, useRootBool bool, rootCommand string, commands []string, shortcuts []string) {
fmt.Println("Arsen Musayelyan's Package Manager Wrapper")
fmt.Println("Current package manager is:", packageManagerCommand)
if useRootBool { fmt.Println("Using root with command:", rootCommand) } else { fmt.Println("Not using root") }
fmt.Println()
fmt.Println("Usage: pak <command> [package]")
fmt.Println("Example: pak in hello")
fmt.Println()
fmt.Println("The available commands are:")
fmt.Println(strings.Join(commands, "\n"))
fmt.Println()
fmt.Println("The available shortcuts are:")
fmt.Println(strings.Join(shortcuts, "\n"))
fmt.Println()
fmt.Println("The available flags are:")
fmt.Println("--help, -h: Shows this help screen")
fmt.Println("--root, -r: Bypasses root user check")
fmt.Println()
fmt.Println("Pak uses a string distance algorithm, so `pak in` is valid as is `pak inst` or `pak install`")
}