17 lines
431 B
Go
17 lines
431 B
Go
// Package platform groups cross-cutting runtime concerns (logging hooks, build/service identity).
|
|
// Metrics and HTTP middleware live in internal/observability for now.
|
|
package platform
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
// ServiceName returns EVOBGP_SERVICE or defaultName when unset.
|
|
func ServiceName(defaultName string) string {
|
|
if v := strings.TrimSpace(os.Getenv("EVOBGP_SERVICE")); v != "" {
|
|
return v
|
|
}
|
|
return defaultName
|
|
}
|