photoprism/internal/server/fail.go
Michael Mayer a2b7615c93 Go: Apply go fix modernizations across backend packages
Run `go fix ./...` and keep mechanical modernization updates.

- Replace `interface{}` with `any` in signatures and local types
- Apply formatter/style cleanups from go1.26 tooling
- Keep `omitempty` behavior-preserving simplifications suggested by fix
- No functional feature changes intended

Validation:
- go test ./... -run '^$' -count=1 (Go 1.26.0)
- GOTOOLCHAIN=go1.24.10 go test ./... -run '^$' -count=1

Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-20 03:54:33 +01:00

14 lines
258 B
Go

package server
import (
"github.com/photoprism/photoprism/internal/server/process"
)
// Fail logs an error and then initiates a server shutdown.
func Fail(err string, params ...any) {
if err != "" {
log.Errorf(err, params...)
}
process.Shutdown()
}