blob: 8215ba5f19d4a4470ea640aad28e89010db814eb [file] [log] [blame]
// Package pubsub contains utilities for working with Cloud PubSub.
package pubsub
import (
"os"
"go.skia.org/infra/go/emulators"
)
// EnsureNotEmulator panics if the PubSub emulator environment variable is set.
func EnsureNotEmulator() {
if os.Getenv(string(emulators.PubSub)) != "" {
panic("PubSub Emulator detected. Be sure to unset the following environment variable: " + emulators.GetEmulatorHostEnvVarName(emulators.PubSub))
}
}