{"modulePath":"github.com/operator-framework/operator-lib","version":"v0.19.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Variables\n\n```go\nvar ErrNoNamespace = fmt.Errorf(\"namespace not found for current environment\")\n```\nErrNoNamespace indicates that a namespace could not be found for the current environment\n\n```go\nvar GetOperatorNamespace = func() (string, error) {\n\tnsBytes, err := readSAFile()\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn \"\", ErrNoNamespace\n\t\t}\n\t\treturn \"\", err\n\t}\n\tns := strings.TrimSpace(string(nsBytes))\n\treturn ns, nil\n}\n```\nGetOperatorNamespace returns the namespace the operator should be running in from the associated service account secret.\n\n","path":"github.com/operator-framework/operator-lib/internal/utils","name":"utils","synopsis":"","isRedistributable":true}
