Last active
October 18, 2018 03:32
-
-
Save indrasaputra/bf80af29e6573e03afc6e0cddb62d381 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
ctx := context.Background() | |
kube := &Kubernetes{} | |
checker := &Checker{} | |
services, _ := kube.AllServices(ctx) | |
// let's make a new services container | |
// so we don't bother with pointer | |
var result []*Service | |
var errorLog [][]error | |
for _, svc := range services { | |
res, errs := checker.CheckStandards(ctx, svc) | |
if errs != nil { | |
errorLog = append(errorLog, errs) | |
} | |
result = append(result, res) | |
} | |
// do the rest as you like | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment