mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
chore: modernize the codebase using go 1.26 (#278)
This runs: ``` go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./... ``` over the codebase, as this is using go 1.26, it can also use the new new() functionallity so AsPtr and boolPtr is are needed anymore. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -226,12 +226,13 @@ func (g *CaddyfileGenerator) Generate(
|
||||
|
||||
// Append error summary as comment if there were any invalid configs.
|
||||
if len(configErrors) > 0 {
|
||||
errorsComment := "# Skipped invalid user-defined configs:\n"
|
||||
var errorsComment strings.Builder
|
||||
errorsComment.WriteString("# Skipped invalid user-defined configs:\n")
|
||||
for _, e := range configErrors {
|
||||
errorsComment += fmt.Sprintf("# - %s\n", e)
|
||||
errorsComment.WriteString(fmt.Sprintf("# - %s\n", e))
|
||||
}
|
||||
|
||||
caddyfile += "\n" + errorsComment
|
||||
caddyfile += "\n" + errorsComment.String()
|
||||
}
|
||||
|
||||
return caddyfileHeader + "\n" + caddyfile, nil
|
||||
|
||||
Reference in New Issue
Block a user