build: modernize with "go fix -stringscutprefix": use strings.CutPrefix

This commit is contained in:
Nick Craig-Wood
2026-08-21 12:23:31 +01:00
parent 7b002153bd
commit aed06f9052
+1 -2
View File
@@ -376,8 +376,7 @@ func (f *PhotosFs) FindLeaf(ctx context.Context, pathID, leaf string) (pathIDOut
return "", false, nil
}
if strings.HasPrefix(pathID, "lib:") {
libraryName := strings.TrimPrefix(pathID, "lib:")
if libraryName, ok := strings.CutPrefix(pathID, "lib:"); ok {
libraries, err := photosService.GetLibraries(ctx)
if err != nil {
return "", false, err