Просмотр исходного кода

wrap emoji package in pkg/emoji

marco 1 год назад
Родитель
Сommit
76e77d7098

+ 1 - 1
cmd/crowdsec-cli/bouncers_table.go

@@ -5,9 +5,9 @@ import (
 	"time"
 
 	"github.com/aquasecurity/table"
-	"github.com/enescakir/emoji"
 
 	"github.com/crowdsecurity/crowdsec/pkg/database/ent"
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 func getBouncersTable(out io.Writer, bouncers []*ent.Bouncer) {

+ 1 - 1
cmd/crowdsec-cli/console_table.go

@@ -4,9 +4,9 @@ import (
 	"io"
 
 	"github.com/aquasecurity/table"
-	"github.com/enescakir/emoji"
 
 	"github.com/crowdsecurity/crowdsec/pkg/csconfig"
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 func cmdConsoleStatusTable(out io.Writer, consoleCfg csconfig.ConsoleConfig) {

+ 1 - 1
cmd/crowdsec-cli/hubtest.go

@@ -10,13 +10,13 @@ import (
 	"text/template"
 
 	"github.com/AlecAivazis/survey/v2"
-	"github.com/enescakir/emoji"
 	"github.com/fatih/color"
 	log "github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
 	"gopkg.in/yaml.v2"
 
 	"github.com/crowdsecurity/crowdsec/pkg/dumps"
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 	"github.com/crowdsecurity/crowdsec/pkg/hubtest"
 )
 

+ 1 - 1
cmd/crowdsec-cli/hubtest_table.go

@@ -5,8 +5,8 @@ import (
 	"io"
 
 	"github.com/aquasecurity/table"
-	"github.com/enescakir/emoji"
 
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 	"github.com/crowdsecurity/crowdsec/pkg/hubtest"
 )
 

+ 1 - 1
cmd/crowdsec-cli/machines_table.go

@@ -5,9 +5,9 @@ import (
 	"time"
 
 	"github.com/aquasecurity/table"
-	"github.com/enescakir/emoji"
 
 	"github.com/crowdsecurity/crowdsec/pkg/database/ent"
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 func getAgentsTable(out io.Writer, machines []*ent.Machine) {

+ 2 - 1
cmd/crowdsec-cli/notifications_table.go

@@ -6,7 +6,8 @@ import (
 	"strings"
 
 	"github.com/aquasecurity/table"
-	"github.com/enescakir/emoji"
+
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 func notificationListTable(out io.Writer, ncfgs map[string]NotificationsCfg) {

+ 1 - 1
cmd/crowdsec-cli/utils_table.go

@@ -6,9 +6,9 @@ import (
 	"strconv"
 
 	"github.com/aquasecurity/table"
-	"github.com/enescakir/emoji"
 
 	"github.com/crowdsecurity/crowdsec/pkg/cwhub"
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 func listHubItemTable(out io.Writer, title string, items []*cwhub.Item) {

+ 2 - 1
pkg/cwhub/item.go

@@ -7,7 +7,8 @@ import (
 	"slices"
 
 	"github.com/Masterminds/semver/v3"
-	"github.com/enescakir/emoji"
+
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 const (

+ 1 - 1
pkg/cwhub/itemupgrade.go

@@ -13,7 +13,7 @@ import (
 	"os"
 	"path/filepath"
 
-	"github.com/enescakir/emoji"
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 )
 
 // Upgrade downloads and applies the last version of the item from the hub.

+ 1 - 1
pkg/dumps/parser_dump.go

@@ -8,9 +8,9 @@ import (
 	"strings"
 	"time"
 
+	"github.com/crowdsecurity/crowdsec/pkg/emoji"
 	"github.com/crowdsecurity/crowdsec/pkg/types"
 	"github.com/crowdsecurity/go-cs-lib/maptools"
-	"github.com/enescakir/emoji"
 	"github.com/fatih/color"
 	diff "github.com/r3labs/diff/v2"
 	log "github.com/sirupsen/logrus"

+ 20 - 0
pkg/emoji/emoji.go

@@ -0,0 +1,20 @@
+package emoji
+
+import (
+	"github.com/enescakir/emoji"
+)
+
+type Emoji = emoji.Emoji
+
+var (
+	CheckMarkButton = emoji.CheckMarkButton
+	CheckMark = emoji.CheckMark
+	CrossMark = emoji.CrossMark
+	GreenCircle = emoji.GreenCircle
+	House = emoji.House
+	Package = emoji.Package
+	Prohibited = emoji.Prohibited
+	QuestionMark = emoji.QuestionMark
+	RedCircle = emoji.RedCircle
+	Warning = emoji.Warning
+)