diff options
author | Robin Jarry <robin@jarry.cc> | 2023-08-23 21:36:23 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-08-27 18:44:12 +0200 |
commit | a5bc7ccf0cae608ac1e72ab4c9ebe5596eb8c988 (patch) | |
tree | be2e5f55fc21980489dca61947ea6b9819853ec3 /widgets/compose.go | |
parent | fff16640ad7cd8c4b73187fbce10f2aa558701be (diff) | |
download | aerc-a5bc7ccf0cae608ac1e72ab4c9ebe5596eb8c988.tar.gz |
xdg: get rid of deprecated dependencies
github.com/mitchellh/go-homedir has not received any update since 2019.
The last release of github.com/kyoh86/xdg was in 2020 and it has been
marked as deprecated by its author.
Replace these with internal functions.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'widgets/compose.go')
-rw-r--r-- | widgets/compose.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/widgets/compose.go b/widgets/compose.go index 5ad67fd3..f682fe5c 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -18,7 +18,6 @@ import ( "github.com/emersion/go-message/mail" "github.com/gdamore/tcell/v2" "github.com/mattn/go-runewidth" - "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "git.sr.ht/~rjarry/aerc/completer" @@ -28,6 +27,7 @@ import ( "git.sr.ht/~rjarry/aerc/lib/state" "git.sr.ht/~rjarry/aerc/lib/templates" "git.sr.ht/~rjarry/aerc/lib/ui" + "git.sr.ht/~rjarry/aerc/lib/xdg" "git.sr.ht/~rjarry/aerc/log" "git.sr.ht/~rjarry/aerc/models" "git.sr.ht/~rjarry/aerc/worker/types" @@ -650,10 +650,7 @@ func (c *Composer) readSignatureFromFile() []byte { if sigFile == "" { return nil } - sigFile, err := homedir.Expand(sigFile) - if err != nil { - return nil - } + sigFile = xdg.ExpandHome(sigFile) signature, err := os.ReadFile(sigFile) if err != nil { c.aerc.PushError( |