Skip to content

Commit

Permalink
fix: object syntax (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aatman committed Sep 8, 2021
1 parent f582714 commit 8928b29
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
@@ -1,4 +1,4 @@
new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down
@@ -1,4 +1,4 @@
new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down Expand Up @@ -32,7 +32,7 @@ new cdk8s.ApiObject("", this, {
},
});

new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down
@@ -1,4 +1,4 @@
new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down Expand Up @@ -32,7 +32,7 @@ new cdk8s.ApiObject("", this, {
},
});

new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down
@@ -1,4 +1,4 @@
new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down Expand Up @@ -32,7 +32,7 @@ new cdk8s.ApiObject("", this, {
},
});

new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
Expand Down
@@ -1,4 +1,4 @@
new cdk8s.ApiObject("", this, {
new cdk8s.ApiObject(this, "", {
apiVersion: "v1",
kind: "ServiceAccount",
metadata: {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube2cdk8s/kube2cdk8s.go
Expand Up @@ -32,7 +32,7 @@ func Kube2CDK8S(filePath string) (string, error) {
output := strings.Join(lines, "\n")

re := regexp.MustCompile("(?m)[\r\n]+^.*const.*$")
res := re.ReplaceAllString(output, `new cdk8s.ApiObject("", this, {`)
res := re.ReplaceAllString(output, `new cdk8s.ApiObject(this, "", {`)

defer os.Remove(path)

Expand Down

0 comments on commit 8928b29

Please sign in to comment.