fix: normalize generated infrastructure file endings
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user