From ef65ec67a88d6827841b37c78122016839ed5e59 Mon Sep 17 00:00:00 2001 From: Hunter Thompson Date: Wed, 8 Sep 2021 00:28:25 +0530 Subject: [PATCH] chore: remove duplicate err handling --- pkg/kube2cdk8s/kube2cdk8s.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/kube2cdk8s/kube2cdk8s.go b/pkg/kube2cdk8s/kube2cdk8s.go index a155204..3dab88c 100644 --- a/pkg/kube2cdk8s/kube2cdk8s.go +++ b/pkg/kube2cdk8s/kube2cdk8s.go @@ -2,7 +2,6 @@ package kube2cdk8s import ( "io/ioutil" - "log" "os" "regexp" "strings" @@ -13,18 +12,13 @@ import ( func Kube2CDK8S(filePath string) (string, error) { path, _, err := kube2pulumi.Kube2PulumiFile(filePath, "typescript") - if err != nil { return "", err } input, err := ioutil.ReadFile(path) if err != nil { - log.Println(err) - } - - if err != nil { - log.Println(err) + return "", err } lines := strings.Split(string(input), "\n")