-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into development
- Loading branch information
Showing
8 changed files
with
65 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.3.6 | ||
0.3.7 |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package generator | ||
|
||
import ( | ||
fs "dredger/fileUtils" | ||
"errors" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/rs/zerolog/log" | ||
) | ||
|
||
func generateReadme(conf GeneratorConfig, serverConf ServerConfig) { | ||
type readmeConfig struct { | ||
ModuleName string | ||
Port int16 | ||
} | ||
|
||
var readmeConf readmeConfig | ||
readmeConf.ModuleName = conf.ModuleName | ||
readmeConf.Port = serverConf.Port | ||
|
||
fileName := "ENVIRONMENT.md" | ||
filePath := filepath.Join(config.Path, fileName) | ||
templateFile := "templates/ENVIRONMENT.md.tmpl" | ||
|
||
if _, err := os.Stat(filePath); errors.Is(err, os.ErrNotExist) { | ||
log.Info().Msg("CREATE ENVIRONMENT.md") | ||
fs.GenerateFile(filePath) | ||
createFileFromTemplate(filePath, templateFile, readmeConf) | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ upper ( snakecase .ModuleName ) }}_PORT_NB the local port of the web service (default=8080) |
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