fix: normalize generated infrastructure file endings

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

View File

@@ -1,6 +1,9 @@
package scaffold package scaffold
import "fmt" import (
"fmt"
"strings"
)
// APIInfrastructure renders shared infrastructure without inventing business // APIInfrastructure renders shared infrastructure without inventing business
// tables or routes. The API generator applies these as developer-owned seeds. // 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 { if err != nil {
return nil, fmt.Errorf("render %s: %w", name, err) return nil, fmt.Errorf("render %s: %w", name, err)
} }
result[name] = []byte(content) result[name] = []byte(strings.TrimRight(content, "\n") + "\n")
} }
return result, nil return result, nil
} }

View File

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