From c7a2b4fb950b4a1fcd2d69cf6d6b031c6ceb46e3 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Wed, 29 May 2024 13:23:08 -0400 Subject: [PATCH] Reorganize function parameters to not specify repeat types --- mutn.go | 4 ++-- src/cli/entryList.go | 4 ++-- src/cli/entryReader.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mutn.go b/mutn.go index acf9d2c..9a1023f 100644 --- a/mutn.go +++ b/mutn.go @@ -37,7 +37,7 @@ func main() { case "show", "-s": cli.EntryReaderDecrypt(targetLocation, false) case "copy": - backend.CopyArgument(targetLocation, 0, args[0]) + backend.CopyArgument(args[0], targetLocation, 0) case "edit": cli.EditEntryField(targetLocation, true, 0) case "gen": @@ -82,7 +82,7 @@ func main() { default: cli.HelpCopy() } - backend.CopyArgument(targetLocation, field, args[0]) + backend.CopyArgument(args[0], targetLocation, field) case "edit": var field int // indicates which (numbered) field to edit switch args[3] { diff --git a/src/cli/entryList.go b/src/cli/entryList.go index 4f5fe84..540223a 100644 --- a/src/cli/entryList.go +++ b/src/cli/entryList.go @@ -46,7 +46,7 @@ func determineIndentation(skippedDirList []bool, dirList []string, currentDirInd } // processing for printing file entries (determines color, line wrapping, and prints) -func printFileEntry(entry string, lastSlash int, charCounter int, colorAlternator int8, indent int) (int, int8) { +func printFileEntry(entry string, lastSlash, charCounter, indent int, colorAlternator int8) (int, int8) { // determine color to print fileEntryName (alternate each time function is run) var colorCode string if colorAlternator > 0 { @@ -130,7 +130,7 @@ func EntryListGen() { printDirectoryHeader(vanityDirectory, indent) } - charCounter, colorAlternator = printFileEntry(file, lastSlash, charCounter, colorAlternator, indent) + charCounter, colorAlternator = printFileEntry(file, lastSlash, charCounter, indent, colorAlternator) } } diff --git a/src/cli/entryReader.go b/src/cli/entryReader.go index f54f269..c32e36f 100644 --- a/src/cli/entryReader.go +++ b/src/cli/entryReader.go @@ -14,7 +14,7 @@ import ( const ansiShownPassword = "\033[38;5;10m" // EntryReader prints the decrypted contents of a libmutton entry in a human-readable format -func EntryReader(decryptedEntry []string, hideSecrets bool, syncEnabled bool) { +func EntryReader(decryptedEntry []string, hideSecrets, syncEnabled bool) { fmt.Println() for i := range decryptedEntry {