pkg/homedir: deprecate GetShortcutString() utility

This function was last used in the pkg/mflag package, which was removed
in 14712f9ff0, and is no longer used in
libnetwork code since e6de8aec2f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-06-26 13:25:40 +02:00
parent 6876e45f9e
commit ddd9665289
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 3 additions and 1 deletions

View file

@ -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
}

View file

@ -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")
}