Skip to content

Commit

Permalink
remove github.com/mitchellh/go-homedir
Browse files Browse the repository at this point in the history
This commit removes the use of the github.com/mitchellh/go-homedir
module and replaces it by a call to the standard library. This
previously required cgo, but is no longer needed now.
  • Loading branch information
tkw1536 committed Dec 3, 2024
1 parent 8e1c26b commit 2e58f8c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 37 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ ggman comes with the following builtin aliases:
### 1.23.0 (Upcoming)

- update dependencies to latest
- use standard library packages where available
- replace unneeded dependencies by standard library
- update to `goprogram` 0.7.0
- minor linting updates
- minor performance improvements
Expand Down
33 changes: 3 additions & 30 deletions constants/legal/notices.go

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions env/vars.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package env

//spellchecker:words reflect github mitchellh homedir pkglib reflectx
//spellchecker:words reflect github pkglib reflectx
import (
"os"
"reflect"

"github.com/mitchellh/go-homedir"
"github.com/tkw1536/pkglib/reflectx"
)

Expand Down Expand Up @@ -67,7 +66,7 @@ func ReadVariables() (v Variables) {

// set the HOME variable
// errors result in an empty home
v.HOME, _ = homedir.Dir()
v.HOME, _ = os.UserHomeDir()

return
}
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
github.com/go-git/go-git/v5 v5.12.0
github.com/jessevdk/go-flags v1.6.1
github.com/lithammer/fuzzysearch v1.1.8
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/tkw1536/goprogram v0.7.0
github.com/tkw1536/pkglib v0.0.0-20241125083302-9392aba00be6
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8
github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
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/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
Expand Down

0 comments on commit 2e58f8c

Please sign in to comment.