Skip to content

Commit ee60d94

Browse files
committed
fix(aboutme): trap an error on init
1 parent 6378ff9 commit ee60d94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

aboutme/aboutme.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ type Me struct {
5353
// a combination of environment variables and file paths to determine
5454
// information about the cluster.
5555
func FromEnv() (*Me, error) {
56-
5756
host := os.Getenv("KUBERNETES_SERVICE_HOST")
5857
port := os.Getenv("KUBERNETES_SERVICE_PORT")
5958
name := NameFromEnv()
@@ -76,7 +75,9 @@ func FromEnv() (*Me, error) {
7675
}
7776
me.c = client
7877

79-
me.init()
78+
if err := me.init(); err != nil {
79+
return me, err
80+
}
8081

8182
return me, nil
8283
}

0 commit comments

Comments
 (0)