mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-04-21 17:36:57 +00:00
Explicitly return empty string on error reading namespace
Signed-off-by: Mikolaj Pawlikowski <mikolaj@pawlikowski.pl>
This commit is contained in:
committed by
GitHub
parent
8a2d9e6f37
commit
5bad42922e
@@ -24,6 +24,7 @@ func getNamespace() string {
|
||||
b, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
|
||||
if err != nil {
|
||||
log.Println("Unable to determine namespace: ", err.Error())
|
||||
return ""
|
||||
}
|
||||
namespace := string(b)
|
||||
return namespace
|
||||
|
||||
Reference in New Issue
Block a user