wrap emoji package in pkg/emoji

This commit is contained in:
marco 2024-02-11 23:40:09 +01:00
parent a6a4d460d7
commit 76e77d7098
11 changed files with 32 additions and 10 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

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

View file

@ -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.

View file

@ -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
pkg/emoji/emoji.go Normal file
View file

@ -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
)