From b98a4d3a12b5be160dba10ff34239813205bf0cf Mon Sep 17 00:00:00 2001 From: Songmu Date: Mon, 2 Jan 2023 16:55:33 +0900 Subject: [PATCH] use os.UserHomeDir instead of go-homedir --- cli.go | 3 +-- go.mod | 1 - go.sum | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cli.go b/cli.go index ef6dce5..679aaef 100644 --- a/cli.go +++ b/cli.go @@ -8,7 +8,6 @@ import ( "path/filepath" "github.com/jessevdk/go-flags" - "github.com/mitchellh/go-homedir" gitconfig "github.com/tcnksm/go-gitconfig" ) @@ -59,7 +58,7 @@ func ghgHome() (string, error) { if ghome != "" { return ghome, nil } - home, err := homedir.Dir() + home, err := os.UserHomeDir() if err != nil { return "", err } diff --git a/go.mod b/go.mod index 124dde5..2d13a77 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.19 require ( github.com/jessevdk/go-flags v1.5.0 github.com/mholt/archiver v3.1.1+incompatible - github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e github.com/octokit/go-octokit v0.4.1-0.20160312003706-812e91dfbd64 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 0fa73eb..afd5ad4 100644 --- a/go.sum +++ b/go.sum @@ -29,8 +29,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8DlasdXRnacluu8HzPts0S1I9zvvUPDbBnXFI= github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM= github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc=