Skip to content

Commit 8928b29

Browse files
author
Aatman
authored
fix: object syntax (#3)
1 parent f582714 commit 8928b29

6 files changed

+9
-9
lines changed

pkg/kube2cdk8s/.snapshots/kube2cdk8s-TestKube2CDK8SDeployment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
new cdk8s.ApiObject("", this, {
1+
new cdk8s.ApiObject(this, "", {
22
apiVersion: "apps/v1",
33
kind: "Deployment",
44
metadata: {

pkg/kube2cdk8s/.snapshots/kube2cdk8s-TestKube2CDK8SMultipleDeployment

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
new cdk8s.ApiObject("", this, {
1+
new cdk8s.ApiObject(this, "", {
22
apiVersion: "apps/v1",
33
kind: "Deployment",
44
metadata: {
@@ -32,7 +32,7 @@ new cdk8s.ApiObject("", this, {
3232
},
3333
});
3434

35-
new cdk8s.ApiObject("", this, {
35+
new cdk8s.ApiObject(this, "", {
3636
apiVersion: "apps/v1",
3737
kind: "Deployment",
3838
metadata: {

pkg/kube2cdk8s/.snapshots/kube2cdk8s-TestKube2CDK8SMultipleDeploymentThree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
new cdk8s.ApiObject("", this, {
1+
new cdk8s.ApiObject(this, "", {
22
apiVersion: "apps/v1",
33
kind: "Deployment",
44
metadata: {
@@ -32,7 +32,7 @@ new cdk8s.ApiObject("", this, {
3232
},
3333
});
3434

35-
new cdk8s.ApiObject("", this, {
35+
new cdk8s.ApiObject(this, "", {
3636
apiVersion: "apps/v1",
3737
kind: "Deployment",
3838
metadata: {

pkg/kube2cdk8s/.snapshots/kube2cdk8s-TestKube2CDK8SMultipleDeploymentTwo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
new cdk8s.ApiObject("", this, {
1+
new cdk8s.ApiObject(this, "", {
22
apiVersion: "apps/v1",
33
kind: "Deployment",
44
metadata: {
@@ -32,7 +32,7 @@ new cdk8s.ApiObject("", this, {
3232
},
3333
});
3434

35-
new cdk8s.ApiObject("", this, {
35+
new cdk8s.ApiObject(this, "", {
3636
apiVersion: "apps/v1",
3737
kind: "Deployment",
3838
metadata: {

pkg/kube2cdk8s/.snapshots/kube2cdk8s-TestKube2CDK8SServiceAccount

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
new cdk8s.ApiObject("", this, {
1+
new cdk8s.ApiObject(this, "", {
22
apiVersion: "v1",
33
kind: "ServiceAccount",
44
metadata: {

pkg/kube2cdk8s/kube2cdk8s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func Kube2CDK8S(filePath string) (string, error) {
3232
output := strings.Join(lines, "\n")
3333

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

3737
defer os.Remove(path)
3838

0 commit comments

Comments
 (0)