mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-14 06:51:15 +00:00
chore: cleanup code formatting
This commit is contained in:
@@ -9,13 +9,14 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/sirupsen/logrus"
|
||||
evbus "github.com/vardius/message-bus"
|
||||
"github.com/yeqown/go-qrcode/v2"
|
||||
"github.com/yeqown/go-qrcode/writer/compressed"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
)
|
||||
|
||||
type Manager struct {
|
||||
|
@@ -2,8 +2,9 @@ package configfile
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"io"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
)
|
||||
|
||||
type UserDatabaseRepo interface {
|
||||
|
@@ -37,10 +37,10 @@ func newTemplateHandler() (*TemplateHandler, error) {
|
||||
func (c TemplateHandler) GetInterfaceConfig(cfg *domain.Interface, peers []domain.Peer) (io.Reader, error) {
|
||||
var tplBuff bytes.Buffer
|
||||
|
||||
err := c.templates.ExecuteTemplate(&tplBuff, "wg_interface.tpl", map[string]interface{}{
|
||||
err := c.templates.ExecuteTemplate(&tplBuff, "wg_interface.tpl", map[string]any{
|
||||
"Interface": cfg,
|
||||
"Peers": peers,
|
||||
"Portal": map[string]interface{}{
|
||||
"Portal": map[string]any{
|
||||
"Version": "unknown",
|
||||
},
|
||||
})
|
||||
@@ -54,9 +54,9 @@ func (c TemplateHandler) GetInterfaceConfig(cfg *domain.Interface, peers []domai
|
||||
func (c TemplateHandler) GetPeerConfig(peer *domain.Peer) (io.Reader, error) {
|
||||
var tplBuff bytes.Buffer
|
||||
|
||||
err := c.templates.ExecuteTemplate(&tplBuff, "wg_peer.tpl", map[string]interface{}{
|
||||
err := c.templates.ExecuteTemplate(&tplBuff, "wg_peer.tpl", map[string]any{
|
||||
"Peer": peer,
|
||||
"Portal": map[string]interface{}{
|
||||
"Portal": map[string]any{
|
||||
"Version": "unknown",
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user