mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-01 02:17:50 +01:00
Updated deps, go.19 migration, nginx template work
This commit is contained in:
1 parent
8d37f5df8d
commit
c00b690ed3
23 files changed
+375
-376
No files matched your search
@@ -2,7 +2,7 @@ package nginx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"npm/internal/entity/certificate"
|
||||
"npm/internal/entity/host"
|
||||
@@ -11,13 +11,12 @@ import (
|
||||
"github.com/aymerick/raymond"
|
||||
)
|
||||
|
||||
// TemplateData ...
|
||||
// TemplateData is a struct
|
||||
type TemplateData struct {
|
||||
ConfDir string
|
||||
DataDir string
|
||||
CertsDir string
|
||||
Host *host.Model
|
||||
Certificate *certificate.Model
|
||||
Host host.Template
|
||||
Certificate certificate.Template
|
||||
}
|
||||
|
||||
func generateHostConfig(template string, data TemplateData) (string, error) {
|
||||
@@ -42,5 +41,5 @@ func writeTemplate(filename, template string, data TemplateData) error {
|
||||
func writeConfigFile(filename, content string) error {
|
||||
logger.Debug("Writing %s with:\n%s", filename, content)
|
||||
// nolint: gosec
|
||||
return ioutil.WriteFile(filename, []byte(content), 0644)
|
||||
return os.WriteFile(filename, []byte(content), 0644)
|
||||
}
|
||||
Reference in new issue
Block a user