jamesread 4 лет назад
Родитель
Сommit
6f5fd20a2c
3 измененных файлов с 8 добавлено и 9 удалено
  1. 5 5
      internal/config/config.go
  2. 2 2
      internal/executor/executor.go
  3. 1 2
      internal/httpservers/webuiServer.go

+ 5 - 5
internal/config/config.go

@@ -13,7 +13,7 @@ type Action struct {
 	Arguments   []ActionArgument
 }
 
-// ActionArgument objects appear on Actions. 
+// ActionArgument objects appear on Actions.
 type ActionArgument struct {
 	Name    string
 	Title   string
@@ -69,8 +69,8 @@ type Config struct {
 	Actions                         []Action `mapstructure:"actions"`
 	Entities                        []Entity `mapstructure:"entities"`
 	CheckForUpdates                 bool
-  ShowFooter                      bool
-  ShowNavigation                  bool
+	ShowFooter                      bool
+	ShowNavigation                  bool
 	ShowNewVersions                 bool
 	Usergroups                      []UserGroup
 	DefaultPermissions              DefaultPermissions
@@ -80,9 +80,9 @@ type Config struct {
 func DefaultConfig() *Config {
 	config := Config{}
 	config.UseSingleHTTPFrontend = true
-  config.ShowFooter = true
+	config.ShowFooter = true
 	config.ShowNavigation = true
-  config.ShowNewVersions = true
+	config.ShowNewVersions = true
 	config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337"
 	config.ListenAddressRestActions = "localhost:1338"
 	config.ListenAddressGrpcActions = "localhost:1339"

+ 2 - 2
internal/executor/executor.go

@@ -6,13 +6,13 @@ import (
 	config "github.com/jamesread/OliveTin/internal/config"
 	log "github.com/sirupsen/logrus"
 
+	"bytes"
 	"context"
 	"errors"
 	"os/exec"
 	"regexp"
 	"strings"
 	"time"
-	"bytes"
 )
 
 var (
@@ -199,7 +199,7 @@ func (e stepExec) Exec(req *ExecutionRequest) bool {
 	cmd.Stderr = &stderr
 
 	runerr := cmd.Run()
-		
+
 	req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode())
 	req.logEntry.Stdout = stdout.String()
 	req.logEntry.Stderr = stderr.String()

+ 1 - 2
internal/httpservers/webuiServer.go

@@ -14,7 +14,7 @@ import (
 type webUISettings struct {
 	Rest             string
 	ThemeName        string
-  ShowFooter       bool
+	ShowFooter       bool
 	ShowNavigation   bool
 	ShowNewVersions  bool
 	AvailableVersion string
@@ -52,7 +52,6 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) {
 		ShowNewVersions:  cfg.ShowNewVersions,
 		AvailableVersion: updatecheck.AvailableVersion,
 		CurrentVersion:   updatecheck.CurrentVersion,
-
 	})
 
 	_, err := w.Write([]byte(jsonRet))