Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add waitgroup support to coordinate goroutines
- Loading branch information
Showing
9 changed files
with
104 additions
and
59 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
package docker | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/commitdev/commit0/internal/config" | ||
"github.com/commitdev/commit0/internal/templator" | ||
"github.com/commitdev/commit0/internal/util" | ||
) | ||
|
||
func GenerateGoAppDockerFile(templator *templator.Templator, config *config.Commit0Config) { | ||
util.TemplateFileIfDoesNotExist("docker/app", "Dockerfile", templator.Docker.ApplicationDocker, config) | ||
func GenerateGoAppDockerFile(templator *templator.Templator, config *config.Commit0Config, wg sync.WaitGroup) { | ||
util.TemplateFileIfDoesNotExist("docker/app", "Dockerfile", templator.Docker.ApplicationDocker, wg, config) | ||
} | ||
|
||
func GenerateGoHTTPGWDockerFile(templator *templator.Templator, config *config.Commit0Config) { | ||
util.TemplateFileIfDoesNotExist("docker/http", "Dockerfile", templator.Docker.HttpGatewayDocker, config) | ||
func GenerateGoHTTPGWDockerFile(templator *templator.Templator, config *config.Commit0Config, wg sync.WaitGroup) { | ||
util.TemplateFileIfDoesNotExist("docker/http", "Dockerfile", templator.Docker.HttpGatewayDocker, wg, config) | ||
} | ||
|
||
func GenerateGoDockerCompose(templator *templator.Templator, config *config.Commit0Config) { | ||
util.TemplateFileIfDoesNotExist("", "docker-compose.yml", templator.Docker.DockerCompose, config) | ||
func GenerateGoDockerCompose(templator *templator.Templator, config *config.Commit0Config, wg sync.WaitGroup) { | ||
util.TemplateFileIfDoesNotExist("", "docker-compose.yml", templator.Docker.DockerCompose, wg, config) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package http | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/commitdev/commit0/internal/config" | ||
"github.com/commitdev/commit0/internal/templator" | ||
"github.com/commitdev/commit0/internal/util" | ||
) | ||
|
||
func GenerateHTTPGW(templator *templator.Templator, config *config.Commit0Config) { | ||
util.TemplateFileAndOverwrite("http", "main.go", templator.Go.GoHTTPGW, config) | ||
func GenerateHTTPGW(templator *templator.Templator, config *config.Commit0Config, wg sync.WaitGroup) { | ||
util.TemplateFileAndOverwrite("http", "main.go", templator.Go.GoHTTPGW, wg, config) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package react | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/commitdev/commit0/internal/config" | ||
"github.com/commitdev/commit0/internal/templator" | ||
) | ||
|
||
func Generate(templator *templator.Templator, config *config.Commit0Config) { | ||
templator.React.TemplateFiles(config, false) | ||
func Generate(templator *templator.Templator, config *config.Commit0Config, wg sync.WaitGroup) { | ||
templator.React.TemplateFiles(config, false, wg) | ||
} |
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
Oops, something went wrong.