From fb70b38dc358908a6cb3ea788d94830d567b73f5 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 11 Dec 2025 20:14:19 -0500 Subject: [PATCH] Sync with latest libmutton development version --- go.mod | 4 ++-- go.sum | 8 ++++---- mutn.go | 7 +++---- src/cli/edit.go | 4 ++-- src/cli/utilitiesMisc.go | 4 ++-- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index c2de323..dd4e0e5 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.25.5 require ( github.com/charmbracelet/glamour v0.7.0 - github.com/rwinkhart/go-boilerplate v0.1.1-0.20251110055016-10ee4f91fcb6 - github.com/rwinkhart/libmutton v0.4.3-0.20251210051340-01be63c587ca + github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366 + github.com/rwinkhart/libmutton v0.4.3-0.20251212003405-35db3bf20b8a golang.org/x/term v0.37.0 ) diff --git a/go.sum b/go.sum index bee55c6..f163439 100644 --- a/go.sum +++ b/go.sum @@ -40,14 +40,14 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rwinkhart/glamour-temp-MUTN v0.7.2 h1:/CBexwkGdL8HuZjO7M0zzjGHaHCr9/r4XTOtUJa+pPE= github.com/rwinkhart/glamour-temp-MUTN v0.7.2/go.mod h1:DN/eJaNQ5h7dgxzfmWFo7By+b82CKEUdNaY6z4R4v3c= -github.com/rwinkhart/go-boilerplate v0.1.1-0.20251110055016-10ee4f91fcb6 h1:tGGtw5Wr4laDrU7Ooe95g4E+O6c+oY18atamcMPaMY8= -github.com/rwinkhart/go-boilerplate v0.1.1-0.20251110055016-10ee4f91fcb6/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY= +github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366 h1:aKB7jcFstg11bRqDnjNzQIGM4+VA4JlE1HDNaPRpm8g= +github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY= github.com/rwinkhart/go-highlite v0.1.1 h1:9TxbRhYVfD/3YaEgNk1BtEiZ0t8/5mxDUZqNMXHodT0= github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA= github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg= github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0= -github.com/rwinkhart/libmutton v0.4.3-0.20251210051340-01be63c587ca h1:dw+GpadTrCg7ExZWio2sTX/XxDt+x4P1Ll16kEN+R+8= -github.com/rwinkhart/libmutton v0.4.3-0.20251210051340-01be63c587ca/go.mod h1:PPF4/BxKeZnKdF2371am2at9nZ3QYm5fL7mLbGuI6U0= +github.com/rwinkhart/libmutton v0.4.3-0.20251212003405-35db3bf20b8a h1:RqfvWNKqoZbAXhKd9ieUeD8MO7sJu1Ieq+UjnUn+AVo= +github.com/rwinkhart/libmutton v0.4.3-0.20251212003405-35db3bf20b8a/go.mod h1:UF4UDldzEOwni81M95Wr5gPfiyoAEOaie8RBWiYC6Ng= github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo= github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c= github.com/rwinkhart/rcw v0.2.3 h1:g1rVaspZnZM8nWupeSdVO827di4ORMZnczw6iXyo01Y= diff --git a/mutn.go b/mutn.go index 75dfe62..eb35352 100644 --- a/mutn.go +++ b/mutn.go @@ -18,7 +18,6 @@ import ( "github.com/rwinkhart/libmutton/crypt" "github.com/rwinkhart/libmutton/global" "github.com/rwinkhart/libmutton/syncclient" - "github.com/rwinkhart/libmutton/synccycles" ) func main() { @@ -60,7 +59,7 @@ func main() { case "add": cli.AddEntry(realPath, 0) case "shear": - err := syncclient.ShearRemoteFromClient(args[1], false) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory + err := syncclient.ShearRemote(args[1], false) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory if err != nil { other.PrintError("Failed to shear target: "+err.Error(), back.ErrorWrite) } @@ -170,7 +169,7 @@ func main() { case "note", "-n": cli.AddEntry(realPath, 2) case "folder", "-f": - err := syncclient.AddFolderRemoteFromClient(args[1]) // pass the incomplete path as the server will have a different home directory + err := syncclient.AddFolderRemote(args[1]) // pass the incomplete path as the server will have a different home directory if err != nil { other.PrintError("Failed to add folder: "+err.Error(), back.ErrorWrite) } @@ -212,7 +211,7 @@ func main() { if err != nil { other.PrintError("Failed to get current device ID: "+err.Error(), back.ErrorRead) } - _, _, _, err = synccycles.DeviceIDGen(oldDeviceID, "") + _, _, _, err = syncclient.GenDeviceID(oldDeviceID, "") if err != nil { other.PrintError("Failed to change device ID: "+err.Error(), global.ErrorSyncProcess) } diff --git a/src/cli/edit.go b/src/cli/edit.go index 6be0193..62b1f3e 100644 --- a/src/cli/edit.go +++ b/src/cli/edit.go @@ -18,12 +18,12 @@ import ( func RenameCli(oldVanityPath string) { // prompt user for new location and rename newVanityPath := front.Input("New location:") - err := syncclient.RenameRemoteFromClient(oldVanityPath, newVanityPath) + err := syncclient.RenameRemote(oldVanityPath, newVanityPath) if err != nil { other.PrintError("Failed to rename entry: "+err.Error(), back.ErrorWrite) } - // exit is done from sync.RenameRemoteFromClient + // exit is done from sync.RenameRemote } // EditEntryField edits a field of an entry at realPath (user input). diff --git a/src/cli/utilitiesMisc.go b/src/cli/utilitiesMisc.go index d207080..88b8257 100644 --- a/src/cli/utilitiesMisc.go +++ b/src/cli/utilitiesMisc.go @@ -6,8 +6,8 @@ import ( "github.com/rwinkhart/go-boilerplate/back" "github.com/rwinkhart/go-boilerplate/front" "github.com/rwinkhart/go-boilerplate/other" + "github.com/rwinkhart/go-boilerplate/stringy" "github.com/rwinkhart/libmutton/core" - "github.com/rwinkhart/libmutton/synccycles" ) // inputPasswordGen prompts the user for password generation parameters and returns a generated password as a string. @@ -24,7 +24,7 @@ func inputPasswordGen() string { complexity = 0.2 // (ultra) complex // 2 and 3 indicate complex and ultra complex charsets, respectively } - return synccycles.StringGen(passLength, complexity, passCharset) + return stringy.StringGen(passLength, complexity, passCharset) } // writeEntryCLI writes an entry to realPath and previews it (errors if no data is supplied).