| commit | 13b4947ef9396dcb6d4496b9868e58a67b0375a9 | [log] [tgz] |
|---|---|---|
| author | Tim Windelschmidt <tim@monogon.tech> | Thu Apr 18 22:39:50 2024 +0200 |
| committer | Tim Windelschmidt <tim@monogon.tech> | Wed Apr 24 14:22:13 2024 +0000 |
| tree | fde1e7ba823e591b301c3958197172895c98d3a2 | |
| parent | 783d078dee9f8446ef702ccef1e16444ed21623a [diff] [blame] |
metropolis/pkg/efivarfs: use strings.ReplaceAll Change-Id: Ifb9da5aa20cabc482bbf44cb809b73e32d75e312 Reviewed-on: https://review.monogon.dev/c/monogon/+/3002 Reviewed-by: Serge Bazanski <serge@monogon.tech> Tested-by: Jenkins CI
diff --git a/metropolis/pkg/efivarfs/devicepath.go b/metropolis/pkg/efivarfs/devicepath.go index 8e9dddb..38dd731 100644 --- a/metropolis/pkg/efivarfs/devicepath.go +++ b/metropolis/pkg/efivarfs/devicepath.go
@@ -211,7 +211,7 @@ if nullIdx != len(out)-1 { return nil, fmt.Errorf("FilePath not properly null-terminated") } - withoutBackslashes := strings.Replace(string(out[:len(out)-1]), `\`, `/`, -1) + withoutBackslashes := strings.ReplaceAll(string(out[:len(out)-1]), `\`, `/`) return FilePath(withoutBackslashes), nil }