From b8d5f56f4e2b0def0800e73020815e4144a92fd7 Mon Sep 17 00:00:00 2001 From: Matthias Friedrich <1573457+matzefriedrich@users.noreply.github.com> Date: Thu, 29 Aug 2024 22:50:41 +0200 Subject: [PATCH] Fix/bootstrap templates (#17) * Minor fixes to the bootstrap templates --- CHANGELOG.md | 7 +++++++ internal/templates/bootstrap/application.gotmpl | 2 +- internal/templates/bootstrap/main.gotmpl | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53c3d0a..911ce3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.8.2] - 2024-08-29 + +### Fixed + +* Minor changes to the bootstrap generator templates + + ## [v0.8.1] - 2024-08-29 Parsley is extended by the `parsley-cli` utility application, which is the foundation for new library features that cannot be implemented on top of reflection. Support for proxy and/or decorator types is better integrated via a code generator approach. diff --git a/internal/templates/bootstrap/application.gotmpl b/internal/templates/bootstrap/application.gotmpl index 6f22a6f..59ae1a1 100644 --- a/internal/templates/bootstrap/application.gotmpl +++ b/internal/templates/bootstrap/application.gotmpl @@ -13,7 +13,7 @@ type parsleyApplication struct { var _ bootstrap.Application = &parsleyApplication{} // newApp Creates the main application service instance. This constructor function gets invoked by Parsley; add parameters for all required services. -func newApp(greeter Greeter) bootstrap.Application { +func NewApp(greeter Greeter) bootstrap.Application { return &parsleyApplication{ greeter: greeter, } diff --git a/internal/templates/bootstrap/main.gotmpl b/internal/templates/bootstrap/main.gotmpl index 895f79f..23c94b1 100644 --- a/internal/templates/bootstrap/main.gotmpl +++ b/internal/templates/bootstrap/main.gotmpl @@ -9,7 +9,7 @@ import ( func main() { context := context.Background() - bootstrap.RunParsleyApplication(context, newApp, configureGreeter) + bootstrap.RunParsleyApplication(context, NewApp, configureGreeter) } // configureGreeter A ModuleFunc registering the required Greeter services.