From 5173ba2a83a484cc5c22e5234bb2baccd0ebd77f Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 19 Apr 2018 22:15:05 +0200 Subject: [PATCH] Moved PrettyPrint to stringutils --- bots/discord/OnMessageCreate.go | 5 ++--- jobs/kitsu-import-anime/shell.go | 4 ++-- jobs/refresh-osu/refresh-osu.go | 3 ++- pages/paypal/success.go | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bots/discord/OnMessageCreate.go b/bots/discord/OnMessageCreate.go index 991a028e..91b4f313 100644 --- a/bots/discord/OnMessageCreate.go +++ b/bots/discord/OnMessageCreate.go @@ -3,8 +3,7 @@ package main import ( "strings" - "github.com/animenotifier/arn" - + "github.com/animenotifier/arn/search" "github.com/bwmarrin/discordgo" ) @@ -58,7 +57,7 @@ func OnMessageCreate(s *discordgo.Session, msg *discordgo.MessageCreate) { if strings.HasPrefix(msg.Content, "!a ") { term := msg.Content[len("!a "):] - animes := arn.SearchAnime(term, 3) + animes := search.Anime(term, 3) message := "" for _, anime := range animes { diff --git a/jobs/kitsu-import-anime/shell.go b/jobs/kitsu-import-anime/shell.go index 5292b57c..0c61eaef 100644 --- a/jobs/kitsu-import-anime/shell.go +++ b/jobs/kitsu-import-anime/shell.go @@ -4,7 +4,7 @@ import ( "errors" "flag" - "github.com/animenotifier/arn" + "github.com/animenotifier/arn/stringutils" "github.com/animenotifier/kitsu" ) @@ -35,7 +35,7 @@ func InvokeShellArgs() bool { sync(kitsuAnime) if verbose { - arn.PrettyPrint(kitsuAnime) + stringutils.PrettyPrint(kitsuAnime) } return true diff --git a/jobs/refresh-osu/refresh-osu.go b/jobs/refresh-osu/refresh-osu.go index 691304a8..59cdfb90 100644 --- a/jobs/refresh-osu/refresh-osu.go +++ b/jobs/refresh-osu/refresh-osu.go @@ -4,6 +4,7 @@ import ( "time" "github.com/animenotifier/arn" + "github.com/animenotifier/arn/stringutils" "github.com/fatih/color" ) @@ -29,7 +30,7 @@ func main() { } // Log it - arn.PrettyPrint(user.Accounts.Osu) + stringutils.PrettyPrint(user.Accounts.Osu) // Save in database user.Save() diff --git a/pages/paypal/success.go b/pages/paypal/success.go index 06176f10..7ffe9a3b 100644 --- a/pages/paypal/success.go +++ b/pages/paypal/success.go @@ -7,6 +7,7 @@ import ( "github.com/aerogo/aero" "github.com/animenotifier/arn" + "github.com/animenotifier/arn/stringutils" "github.com/animenotifier/notify.moe/components" "github.com/animenotifier/notify.moe/utils" ) @@ -60,7 +61,7 @@ func Success(ctx *aero.Context) string { return ctx.Error(http.StatusInternalServerError, "Could not retrieve payment information", err) } - arn.PrettyPrint(sdkPayment) + stringutils.PrettyPrint(sdkPayment) transaction := sdkPayment.Transactions[0]