gpgToRCW: Bump all direct dependencies

This commit is contained in:
2025-06-19 18:16:43 -04:00
parent d63d77e69f
commit 619ea52f7a
4 changed files with 25 additions and 19 deletions
+5 -5
View File
@@ -1,15 +1,15 @@
module gpgToRCW module gpgToRCW
go 1.24.3 go 1.24.4
require ( require (
github.com/rwinkhart/go-boilerplate v0.0.0-20250509173525-20670ec7bb9c github.com/rwinkhart/go-boilerplate v0.1.0
github.com/rwinkhart/libmutton v0.3.2-0.20250520161453-e64da70edb84 github.com/rwinkhart/libmutton v0.3.2-0.20250619221323-1c0671354862
github.com/rwinkhart/rcw v0.2.0 github.com/rwinkhart/rcw v0.2.1
) )
require ( require (
golang.org/x/crypto v0.38.0 // indirect golang.org/x/crypto v0.39.0 // indirect
golang.org/x/sys v0.33.0 // indirect golang.org/x/sys v0.33.0 // indirect
golang.org/x/term v0.32.0 // indirect golang.org/x/term v0.32.0 // indirect
) )
+8 -6
View File
@@ -1,12 +1,14 @@
github.com/rwinkhart/go-boilerplate v0.0.0-20250509173525-20670ec7bb9c h1:RIMnYf1MwsvmAr9E0/cpn7rTh8BWdfsQ2r31ITKJp2A= github.com/rwinkhart/go-boilerplate v0.1.0 h1:EzlVj6R7Bxtl79Nl7R5zRcg6s+Cf2FAqGIzR4giWTQg=
github.com/rwinkhart/go-boilerplate v0.0.0-20250509173525-20670ec7bb9c/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY= github.com/rwinkhart/go-boilerplate v0.1.0/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY=
github.com/rwinkhart/libmutton v0.3.2-0.20250520161453-e64da70edb84 h1:7WUBDHVGgW5Dd4wm56X8qQpWUNOvh2Y/IQkjBl7atEE= github.com/rwinkhart/libmutton v0.3.2-0.20250520161453-e64da70edb84 h1:7WUBDHVGgW5Dd4wm56X8qQpWUNOvh2Y/IQkjBl7atEE=
github.com/rwinkhart/libmutton v0.3.2-0.20250520161453-e64da70edb84/go.mod h1:noIP2Ov56fNq2McVhkOj5+VVLOV4E2eie2HbuOhXhXA= github.com/rwinkhart/libmutton v0.3.2-0.20250520161453-e64da70edb84/go.mod h1:noIP2Ov56fNq2McVhkOj5+VVLOV4E2eie2HbuOhXhXA=
github.com/rwinkhart/rcw v0.2.0 h1:/rFgJ+20OSThipKAX5KPwW2xbPpgh1zl49THmEkkPis= github.com/rwinkhart/libmutton v0.3.2-0.20250619221323-1c0671354862 h1:2sOYCHUzjtB4NBRpqvYYzC6oidkb40otUEGamProVwQ=
github.com/rwinkhart/rcw v0.2.0/go.mod h1:LQ2/YJFQlkW+JkgrLpZ51NQP/unIEzPTWsLOpOuKdKU= github.com/rwinkhart/libmutton v0.3.2-0.20250619221323-1c0671354862/go.mod h1:E0+uwcSUDbuwgwEjwmx4unWVyaHNcSS+bbwGiCFAYf0=
github.com/rwinkhart/rcw v0.2.1 h1:TCKmk557e/+EH3q1VGWiAnWuP7VUHbyhjtJWwpojPtk=
github.com/rwinkhart/rcw v0.2.1/go.mod h1:8aom27OU0OEAUDZni6YQx5YYW6pIotIFfFXxsYTFZsU=
github.com/rwinkhart/sys-freebsd-13-xucred v0.33.0 h1:W4J4cS0yLMLKuYePFFL2OR8MAYLoHkErJvq9FBBqK70= github.com/rwinkhart/sys-freebsd-13-xucred v0.33.0 h1:W4J4cS0yLMLKuYePFFL2OR8MAYLoHkErJvq9FBBqK70=
github.com/rwinkhart/sys-freebsd-13-xucred v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= github.com/rwinkhart/sys-freebsd-13-xucred v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/rwinkhart/go-boilerplate/back" "github.com/rwinkhart/go-boilerplate/other"
"github.com/rwinkhart/libmutton/global" "github.com/rwinkhart/libmutton/global"
) )
@@ -13,7 +13,7 @@ func decryptGPG(targetLocation string) []string {
cmd := exec.Command("gpg", "--pinentry-mode", "loopback", "-q", "-d", targetLocation) cmd := exec.Command("gpg", "--pinentry-mode", "loopback", "-q", "-d", targetLocation)
output, err := cmd.Output() output, err := cmd.Output()
if err != nil { if err != nil {
back.PrintError("Failed to decrypt \""+targetLocation+"\" - Ensure it is a valid GPG-encrypted file and that you entered your passphrase correctly", global.ErrorDecryption, true) other.PrintError("Failed to decrypt \""+targetLocation+"\" - Ensure it is a valid GPG-encrypted file and that you entered your passphrase correctly", global.ErrorDecryption)
} }
return strings.Split(string(output), "\n") return strings.Split(string(output), "\n")
} }
+10 -6
View File
@@ -8,6 +8,7 @@ import (
"github.com/rwinkhart/go-boilerplate/back" "github.com/rwinkhart/go-boilerplate/back"
"github.com/rwinkhart/go-boilerplate/front" "github.com/rwinkhart/go-boilerplate/front"
"github.com/rwinkhart/go-boilerplate/other"
"github.com/rwinkhart/libmutton/global" "github.com/rwinkhart/libmutton/global"
"github.com/rwinkhart/libmutton/synccommon" "github.com/rwinkhart/libmutton/synccommon"
"github.com/rwinkhart/rcw/wrappers" "github.com/rwinkhart/rcw/wrappers"
@@ -28,11 +29,14 @@ func main() {
// convert the entries // convert the entries
fmt.Print("\nRe-encrypting entries. Please wait; do not force close this process.\n\nGPG may prompt you for a passphrase for decryption.\n\n") fmt.Print("\nRe-encrypting entries. Please wait; do not force close this process.\n\nGPG may prompt you for a passphrase for decryption.\n\n")
var outputDir = global.EntryRoot + "-new" var outputDir = global.EntryRoot + "-new"
entries, folders := synccommon.WalkEntryDir() entries, folders, err := synccommon.WalkEntryDir()
if err != nil {
other.PrintError("Failed to walk entry directory: "+err.Error(), back.ErrorRead)
}
for _, folder := range folders { for _, folder := range folders {
err := os.MkdirAll(outputDir+strings.ReplaceAll(folder, "/", global.PathSeparator), 0700) err := os.MkdirAll(outputDir+strings.ReplaceAll(folder, "/", global.PathSeparator), 0700)
if err != nil { if err != nil {
back.PrintError("Failed to create directory: "+err.Error(), back.ErrorWrite, true) other.PrintError("Failed to create directory: "+err.Error(), back.ErrorWrite)
} }
} }
var decLines []string var decLines []string
@@ -42,17 +46,17 @@ func main() {
encBytes := wrappers.Encrypt([]byte(strings.Join(decLines, "\n")), rcwPassphrase) encBytes := wrappers.Encrypt([]byte(strings.Join(decLines, "\n")), rcwPassphrase)
err := os.WriteFile(outputDir+strings.ReplaceAll(entry, "/", global.PathSeparator), encBytes, 0600) err := os.WriteFile(outputDir+strings.ReplaceAll(entry, "/", global.PathSeparator), encBytes, 0600)
if err != nil { if err != nil {
back.PrintError("Failed to write to file: "+err.Error(), back.ErrorWrite, true) other.PrintError("Failed to write to file: "+err.Error(), back.ErrorWrite)
} }
} }
// swap the new directory with the old one // swap the new directory with the old one
err := os.Rename(global.EntryRoot, global.EntryRoot+"-old") err = os.Rename(global.EntryRoot, global.EntryRoot+"-old")
if err != nil { if err != nil {
back.PrintError("Failed to rename old directory: "+err.Error(), back.ErrorWrite, true) other.PrintError("Failed to rename old directory: "+err.Error(), back.ErrorWrite)
} }
err = os.Rename(outputDir, global.EntryRoot) err = os.Rename(outputDir, global.EntryRoot)
if err != nil { if err != nil {
back.PrintError("Failed to rename new directory: "+err.Error(), back.ErrorWrite, true) other.PrintError("Failed to rename new directory: "+err.Error(), back.ErrorWrite)
} }
} }