Skip to content

Commit c6aa884

Browse files
committed
Fixed merge conficts from rebase
1 parent 46a3fcd commit c6aa884

File tree

5 files changed

+10
-205
lines changed

5 files changed

+10
-205
lines changed

cmd/generate.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
package cmd
22

33
import (
4-
5-
"log"
6-
"sync"
74
"github.com/commitdev/commit0/internal/config"
85
"github.com/commitdev/commit0/internal/generate/docker"
96
"github.com/commitdev/commit0/internal/generate/golang"
107
"github.com/commitdev/commit0/internal/generate/http"
8+
"github.com/commitdev/commit0/internal/generate/kubernetes"
119
"github.com/commitdev/commit0/internal/generate/proto"
1210
"github.com/commitdev/commit0/internal/generate/react"
13-
"github.com/commitdev/commit0/internal/generate/kubernetes"
1411
"github.com/commitdev/commit0/internal/templator"
1512
"github.com/commitdev/commit0/internal/util"
1613
"github.com/gobuffalo/packr/v2"
1714
"github.com/spf13/cobra"
15+
"log"
16+
"sync"
1817
)
1918

2019
var configPath string
@@ -62,7 +61,7 @@ var generateCmd = &cobra.Command{
6261
case React:
6362
react.Generate(t, cfg, &wg)
6463
case Kubernetes:
65-
kubernetes.Generate(Templator, cfg)
64+
kubernetes.Generate(t, cfg, &wg)
6665
}
6766

6867
util.TemplateFileIfDoesNotExist("", "README.md", t.Readme, &wg, cfg)

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:
7272
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
7373
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
7474
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
75-
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 h1:ACG4HJsFiNMf47Y4PeRoebLNy/2lXT9EtprMuTFWt1M=
76-
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
7775
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
7876
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
7977
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

internal/generate/kubernetes/generate.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package kubernetes
22

33
import (
44
"bytes"
5-
"github.com/commitdev/commit0/config"
6-
"github.com/commitdev/commit0/templator"
5+
"github.com/commitdev/commit0/internal/config"
6+
"github.com/commitdev/commit0/internal/templator"
77
"io"
88
"log"
99
"os"
@@ -12,8 +12,8 @@ import (
1212
"sync"
1313
)
1414

15-
func Generate(templator *templator.Templator, config *config.Commit0Config) {
16-
templator.Kubernetes.TemplateFiles(config, false)
15+
func Generate(templator *templator.Templator, config *config.Commit0Config, wg *sync.WaitGroup) {
16+
templator.Kubernetes.TemplateFiles(config, false, wg)
1717

1818
if config.Kubernetes.Deploy {
1919
_tf_init := tf_init()

internal/templator/templator.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type Templator struct {
4141
Go *GoTemplator
4242
Docker *DockerTemplator
4343
React *DirectoryTemplator
44+
Kubernetes *DirectoryTemplator
4445
}
4546

4647
func NewTemplator(box *packr.Box) *Templator {
@@ -54,6 +55,7 @@ func NewTemplator(box *packr.Box) *Templator {
5455
Readme: NewSingleFileTemplator(box, "util/README.tmpl"),
5556
Docker: NewDockerFileTemplator(box),
5657
React: NewDirectoryTemplator(box, "react"),
58+
Kubernetes: NewDirectoryTemplator(box, "kubernetes"),
5759
}
5860
}
5961

templator/templator.go

Lines changed: 0 additions & 194 deletions
This file was deleted.

0 commit comments

Comments
 (0)