diff --git a/cmd/go-omni/scaffold/apiInfrastructure.go b/cmd/go-omni/scaffold/apiInfrastructure.go index 377d71c..e4d63f3 100644 --- a/cmd/go-omni/scaffold/apiInfrastructure.go +++ b/cmd/go-omni/scaffold/apiInfrastructure.go @@ -1,6 +1,9 @@ package scaffold -import "fmt" +import ( + "fmt" + "strings" +) // APIInfrastructure renders shared infrastructure without inventing business // tables or routes. The API generator applies these as developer-owned seeds. @@ -20,7 +23,7 @@ func APIInfrastructure(module, database, storage, logOutput, logFormat string) ( if err != nil { return nil, fmt.Errorf("render %s: %w", name, err) } - result[name] = []byte(content) + result[name] = []byte(strings.TrimRight(content, "\n") + "\n") } return result, nil } diff --git a/examples/userService/etc/config.yaml b/examples/userService/etc/config.yaml index f8c5ed6..cb45f01 100644 --- a/examples/userService/etc/config.yaml +++ b/examples/userService/etc/config.yaml @@ -34,4 +34,3 @@ database: connMaxIdleTime: 5m pingTimeout: 5s # GO_OMNI_DB_DSN supplies the secret connection string. -