fix formatting

Signed-off-by: Odyssey <odyssey346@disroot.org>
This commit is contained in:
Odyssey 2023-01-19 16:04:28 +01:00
parent 38ae5ad2c6
commit c54ce2b46b

11
main.go
View File

@ -1,15 +1,16 @@
package main package main
import ( import (
"github.com/ProjectSegfault/publapi/pages"
"github.com/gofiber/fiber/v2"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"os" "os"
"os/exec" "os/exec"
"regexp" "regexp"
"runtime" "runtime"
"strings" "strings"
"github.com/ProjectSegfault/publapi/pages"
"github.com/gofiber/fiber/v2"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
) )
type Userstruct struct { type Userstruct struct {
@ -18,6 +19,7 @@ type Userstruct struct {
Total int `json:"total"` Total int `json:"total"`
Users []Userinfo `json:"users"` Users []Userinfo `json:"users"`
} }
type Userinfo struct { type Userinfo struct {
Name string `json:"name"` Name string `json:"name"`
FullName string `json:"fullName"` FullName string `json:"fullName"`
@ -40,6 +42,7 @@ func Dedup(input string) string {
} }
return strings.Join(unique, " ") return strings.Join(unique, " ")
} }
func contains(strs []string, str string) bool { func contains(strs []string, str string) bool {
for _, s := range strs { for _, s := range strs {
if s == str { if s == str {