Skip to content

Commit ddd9665

Browse files
committed
pkg/homedir: deprecate GetShortcutString() utility
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 <[email protected]>
1 parent 6876e45 commit ddd9665

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/homedir/homedir.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ func Get() string {
3535

3636
// GetShortcutString returns the string that is shortcut to user's home directory
3737
// in the native shell of the platform running on.
38+
//
39+
// Deprecated: this function is no longer used, and will be removed in the next release.
3840
func GetShortcutString() string {
3941
return homeShortCut
4042
}

pkg/homedir/homedir_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestGet(t *testing.T) {
1717
}
1818

1919
func TestGetShortcutString(t *testing.T) {
20-
shortcut := GetShortcutString()
20+
shortcut := GetShortcutString() //nolint:staticcheck // ignore SA1019 (GetShortcutString is deprecated)
2121
if shortcut == "" {
2222
t.Fatal("returned shortcut string is empty")
2323
}

0 commit comments

Comments
 (0)