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. // Handler authenticating a user and returning a bearer token for API requests.
// //
// Consumes: // Consumes:
// - application/json // - application/json
//
// Produces: // Produces:
// - application/json // - application/json
// //
// Responses: // Responses:
// 200: authResponse //
// 400: errorResponse // 200: authResponse
// 403: errorResponse // 400: errorResponse
// 500: errorResponse // 403: errorResponse
// 500: errorResponse
func Auth(c *gin.Context) { func Auth(c *gin.Context) {
var auth AuthRequest var auth AuthRequest

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff