fix: normalize generated infrastructure file endings

This commit is contained in:
2026-09-23 17:35:00 +08:00
parent 2c74dc0859
commit 0ce3efb6fc
2 changed files with 5 additions and 3 deletions

View File

@@ -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
}

View File

@@ -34,4 +34,3 @@ database:
connMaxIdleTime: 5m
pingTimeout: 5s
# GO_OMNI_DB_DSN supplies the secret connection string.