Skip to content

Commit

Permalink
pkg/homedir: deprecate GetShortcutString() utility
Browse files Browse the repository at this point in the history
This function was last used in the pkg/mflag package, which was removed
in 14712f9, and is no longer used in
libnetwork code since moby/libnetwork@e6de8ae

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah authored and pull[bot] committed Aug 3, 2023
1 parent 81c667a commit 2525425
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/homedir/homedir.go
Expand Up @@ -35,6 +35,8 @@ func Get() string {

// GetShortcutString returns the string that is shortcut to user's home directory
// in the native shell of the platform running on.
//
// Deprecated: this function is no longer used, and will be removed in the next release.
func GetShortcutString() string {
return homeShortCut
}
2 changes: 1 addition & 1 deletion pkg/homedir/homedir_test.go
Expand Up @@ -17,7 +17,7 @@ func TestGet(t *testing.T) {
}

func TestGetShortcutString(t *testing.T) {
shortcut := GetShortcutString()
shortcut := GetShortcutString() //nolint:staticcheck // ignore SA1019 (GetShortcutString is deprecated)
if shortcut == "" {
t.Fatal("returned shortcut string is empty")
}
Expand Down

0 comments on commit 2525425

Please sign in to comment.