fmt: gofmt cleanup
This commit is contained in:
parent
42cde3ba70
commit
6f5fd20a2c
|
|
@ -13,7 +13,7 @@ type Action struct {
|
||||||
Arguments []ActionArgument
|
Arguments []ActionArgument
|
||||||
}
|
}
|
||||||
|
|
||||||
// ActionArgument objects appear on Actions.
|
// ActionArgument objects appear on Actions.
|
||||||
type ActionArgument struct {
|
type ActionArgument struct {
|
||||||
Name string
|
Name string
|
||||||
Title string
|
Title string
|
||||||
|
|
@ -69,8 +69,8 @@ type Config struct {
|
||||||
Actions []Action `mapstructure:"actions"`
|
Actions []Action `mapstructure:"actions"`
|
||||||
Entities []Entity `mapstructure:"entities"`
|
Entities []Entity `mapstructure:"entities"`
|
||||||
CheckForUpdates bool
|
CheckForUpdates bool
|
||||||
ShowFooter bool
|
ShowFooter bool
|
||||||
ShowNavigation bool
|
ShowNavigation bool
|
||||||
ShowNewVersions bool
|
ShowNewVersions bool
|
||||||
Usergroups []UserGroup
|
Usergroups []UserGroup
|
||||||
DefaultPermissions DefaultPermissions
|
DefaultPermissions DefaultPermissions
|
||||||
|
|
@ -80,9 +80,9 @@ type Config struct {
|
||||||
func DefaultConfig() *Config {
|
func DefaultConfig() *Config {
|
||||||
config := Config{}
|
config := Config{}
|
||||||
config.UseSingleHTTPFrontend = true
|
config.UseSingleHTTPFrontend = true
|
||||||
config.ShowFooter = true
|
config.ShowFooter = true
|
||||||
config.ShowNavigation = true
|
config.ShowNavigation = true
|
||||||
config.ShowNewVersions = true
|
config.ShowNewVersions = true
|
||||||
config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337"
|
config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337"
|
||||||
config.ListenAddressRestActions = "localhost:1338"
|
config.ListenAddressRestActions = "localhost:1338"
|
||||||
config.ListenAddressGrpcActions = "localhost:1339"
|
config.ListenAddressGrpcActions = "localhost:1339"
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ import (
|
||||||
config "github.com/jamesread/OliveTin/internal/config"
|
config "github.com/jamesread/OliveTin/internal/config"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"bytes"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -199,7 +199,7 @@ func (e stepExec) Exec(req *ExecutionRequest) bool {
|
||||||
cmd.Stderr = &stderr
|
cmd.Stderr = &stderr
|
||||||
|
|
||||||
runerr := cmd.Run()
|
runerr := cmd.Run()
|
||||||
|
|
||||||
req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode())
|
req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode())
|
||||||
req.logEntry.Stdout = stdout.String()
|
req.logEntry.Stdout = stdout.String()
|
||||||
req.logEntry.Stderr = stderr.String()
|
req.logEntry.Stderr = stderr.String()
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import (
|
||||||
type webUISettings struct {
|
type webUISettings struct {
|
||||||
Rest string
|
Rest string
|
||||||
ThemeName string
|
ThemeName string
|
||||||
ShowFooter bool
|
ShowFooter bool
|
||||||
ShowNavigation bool
|
ShowNavigation bool
|
||||||
ShowNewVersions bool
|
ShowNewVersions bool
|
||||||
AvailableVersion string
|
AvailableVersion string
|
||||||
|
|
@ -52,7 +52,6 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) {
|
||||||
ShowNewVersions: cfg.ShowNewVersions,
|
ShowNewVersions: cfg.ShowNewVersions,
|
||||||
AvailableVersion: updatecheck.AvailableVersion,
|
AvailableVersion: updatecheck.AvailableVersion,
|
||||||
CurrentVersion: updatecheck.CurrentVersion,
|
CurrentVersion: updatecheck.CurrentVersion,
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
_, err := w.Write([]byte(jsonRet))
|
_, err := w.Write([]byte(jsonRet))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue