fix: recursive go fmt

This commit is contained in:
Simone Margaritelli
2024-04-06 10:43:34 -04:00
parent 288b5e668d
commit 56effa16a7
8 changed files with 639 additions and 633 deletions

View File

@@ -44,15 +44,17 @@ type AuthResponse struct {
// Handler authenticating a user and returning a bearer token for API requests.
//
// Consumes:
// - application/json
// - application/json
//
// Produces:
// - application/json
// - application/json
//
// Responses:
// 200: authResponse
// 400: errorResponse
// 403: errorResponse
// 500: errorResponse
//
// 200: authResponse
// 400: errorResponse
// 403: errorResponse
// 500: errorResponse
func Auth(c *gin.Context) {
var auth AuthRequest

View File

@@ -69,10 +69,11 @@ func SafeBind(c *gin.Context, obj interface{}) error {
// Handler returning the current server status.
//
// Produces:
// - application/json
// - application/json
//
// Responses:
// 200: Status
//
// 200: Status
func GetStatus(c *gin.Context) {
// utils.Api(log.DEBUG, c, "Requested status.")
c.JSON(200, ServerStatus)
@@ -88,10 +89,11 @@ func ClearEvents(c *gin.Context) {
// Handler returning the current server configuration.
//
// Produces:
// - application/json
// - application/json
//
// Responses:
// 200: Configuration
//
// 200: Configuration
func GetConfig(c *gin.Context) {
utils.Api(log.DEBUG, c, "Requested configuration.")
c.JSON(200, config.Conf)

View File

@@ -12,8 +12,8 @@ import (
"fmt"
"github.com/evilsocket/arc/config"
"github.com/evilsocket/arc/db"
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/arc/utils"
"github.com/evilsocket/islazy/log"
"github.com/gin-gonic/gin"
)

View File

@@ -9,8 +9,8 @@ package controllers
import (
"github.com/evilsocket/arc/db"
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/arc/utils"
"github.com/evilsocket/islazy/log"
"github.com/gin-gonic/gin"
)

View File

@@ -8,8 +8,8 @@
package db
import (
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/arc/utils"
"github.com/evilsocket/islazy/log"
"github.com/theckman/go-flock"
"path/filepath"
"strings"

View File

@@ -11,8 +11,8 @@ import (
"compress/gzip"
"fmt"
"github.com/evilsocket/arc/config"
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/arc/utils"
"github.com/evilsocket/islazy/log"
"io"
"os"
"path/filepath"

View File

@@ -58,9 +58,9 @@ func doEmailReport(event Event) (err error) {
cmd := exec.Command(sendmailPath, "-t")
body = "From: arc@localhost\n" +
fmt.Sprintf("To: %s", config.Conf.Scheduler.Reports.To ) + "\n" +
fmt.Sprintf("Subject: %s", event.Title ) + "\n" +
fmt.Sprintf("Content-Type: %s", contentType ) + "\n" +
fmt.Sprintf("To: %s", config.Conf.Scheduler.Reports.To) + "\n" +
fmt.Sprintf("Subject: %s", event.Title) + "\n" +
fmt.Sprintf("Content-Type: %s", contentType) + "\n" +
"Content-Transfer-Encoding: 7BIT\n" +
"Content-Disposition: inline\n" +
"MIME-Version: 1.0\n" +

File diff suppressed because it is too large Load Diff