From 8b008eef9fc540762db81ea748c8287a1586d9cf Mon Sep 17 00:00:00 2001 From: OpenWaygate <27287694+OpenWaygate@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:37:22 +0800 Subject: [PATCH] :art: Optimize imports --- pkg/activity/activity.go | 3 ++- pkg/activity/activity_test.go | 3 ++- pkg/auth/auth.go | 9 +++++---- pkg/auth/service.go | 7 ++++--- pkg/caption/caption.go | 5 +++-- pkg/caption/caption_test.go | 3 ++- pkg/channel/channel.go | 3 ++- pkg/channel/channel_test.go | 3 ++- pkg/channelBanner/channelBanner.go | 5 +++-- pkg/channelSection/channelSection.go | 3 ++- pkg/channelSection/channelSection_test.go | 3 ++- pkg/comment/comment.go | 3 ++- pkg/comment/comment_test.go | 3 ++- pkg/commentThread/commentThread.go | 3 ++- pkg/i18nLanguage/i18nLanguage.go | 3 ++- pkg/i18nRegion/i18nRegion.go | 3 ++- pkg/member/member.go | 3 ++- pkg/membershipsLevel/membershipsLevel.go | 3 ++- pkg/playlist/playlist.go | 3 ++- pkg/playlist/playlist_test.go | 3 ++- pkg/playlistImage/playlistImage.go | 5 +++-- pkg/playlistItem/playlistItem.go | 3 ++- pkg/search/search.go | 3 ++- pkg/search/search_test.go | 3 ++- pkg/subscription/subscription.go | 3 ++- pkg/subscription/subscription_test.go | 3 ++- pkg/superChatEvent/superChatEvent.go | 3 ++- pkg/thumbnail/thumbnail.go | 5 +++-- pkg/video/video.go | 7 ++++--- pkg/video/video_test.go | 3 ++- pkg/videoAbuseReportReason/videoAbuseReportReason.go | 3 ++- pkg/videoCategory/videoCategory.go | 3 ++- pkg/watermark/watermark.go | 5 +++-- 33 files changed, 78 insertions(+), 45 deletions(-) diff --git a/pkg/activity/activity.go b/pkg/activity/activity.go index f9fa56f..61392f9 100644 --- a/pkg/activity/activity.go +++ b/pkg/activity/activity.go @@ -2,11 +2,12 @@ package activity import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/activity/activity_test.go b/pkg/activity/activity_test.go index 8373a2a..efb0844 100644 --- a/pkg/activity/activity_test.go +++ b/pkg/activity/activity_test.go @@ -1,9 +1,10 @@ package activity import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewActivity(t *testing.T) { diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index ef603e6..0ba9a00 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -5,16 +5,17 @@ import ( "encoding/json" "errors" "fmt" - "github.com/eat-pray-ai/yutu/pkg/utils" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "google.golang.org/api/youtube/v3" "log" "net" "net/http" "net/url" "os" "strings" + + "github.com/eat-pray-ai/yutu/pkg/utils" + "golang.org/x/oauth2" + "golang.org/x/oauth2/google" + "google.golang.org/api/youtube/v3" ) const ( diff --git a/pkg/auth/service.go b/pkg/auth/service.go index 702f7f6..7bff708 100644 --- a/pkg/auth/service.go +++ b/pkg/auth/service.go @@ -5,12 +5,13 @@ import ( "encoding/base64" "errors" "fmt" - "github.com/eat-pray-ai/yutu/pkg/utils" - "google.golang.org/api/option" - "google.golang.org/api/youtube/v3" "log" "os" "strings" + + "github.com/eat-pray-ai/yutu/pkg/utils" + "google.golang.org/api/option" + "google.golang.org/api/youtube/v3" ) var ( diff --git a/pkg/caption/caption.go b/pkg/caption/caption.go index f134b6b..3117d84 100644 --- a/pkg/caption/caption.go +++ b/pkg/caption/caption.go @@ -3,12 +3,13 @@ package caption import ( "errors" "fmt" + "io" + "os" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" - "os" ) var ( diff --git a/pkg/caption/caption_test.go b/pkg/caption/caption_test.go index ef1f810..3cc5b25 100644 --- a/pkg/caption/caption_test.go +++ b/pkg/caption/caption_test.go @@ -1,9 +1,10 @@ package caption import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewCation(t *testing.T) { diff --git a/pkg/channel/channel.go b/pkg/channel/channel.go index 9f89ce8..05017e3 100644 --- a/pkg/channel/channel.go +++ b/pkg/channel/channel.go @@ -3,10 +3,11 @@ package channel import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" - "io" "google.golang.org/api/youtube/v3" ) diff --git a/pkg/channel/channel_test.go b/pkg/channel/channel_test.go index 35e3874..5316f05 100644 --- a/pkg/channel/channel_test.go +++ b/pkg/channel/channel_test.go @@ -1,9 +1,10 @@ package channel import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewChannel(t *testing.T) { diff --git a/pkg/channelBanner/channelBanner.go b/pkg/channelBanner/channelBanner.go index 1766b60..58eb799 100644 --- a/pkg/channelBanner/channelBanner.go +++ b/pkg/channelBanner/channelBanner.go @@ -3,11 +3,12 @@ package channelBanner import ( "errors" "fmt" + "io" + "os" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "google.golang.org/api/youtube/v3" - "io" - "os" ) var ( diff --git a/pkg/channelSection/channelSection.go b/pkg/channelSection/channelSection.go index cf4c80c..0ce303b 100644 --- a/pkg/channelSection/channelSection.go +++ b/pkg/channelSection/channelSection.go @@ -3,11 +3,12 @@ package channelSection import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/channelSection/channelSection_test.go b/pkg/channelSection/channelSection_test.go index 0f43c95..551730d 100644 --- a/pkg/channelSection/channelSection_test.go +++ b/pkg/channelSection/channelSection_test.go @@ -1,9 +1,10 @@ package channelSection import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewChannelSection(t *testing.T) { diff --git a/pkg/comment/comment.go b/pkg/comment/comment.go index 3c9348d..3cea713 100644 --- a/pkg/comment/comment.go +++ b/pkg/comment/comment.go @@ -3,11 +3,12 @@ package comment import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/comment/comment_test.go b/pkg/comment/comment_test.go index 4ef0f7a..66f9095 100644 --- a/pkg/comment/comment_test.go +++ b/pkg/comment/comment_test.go @@ -1,9 +1,10 @@ package comment import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewComment(t *testing.T) { diff --git a/pkg/commentThread/commentThread.go b/pkg/commentThread/commentThread.go index a4ba31b..39ca7f6 100644 --- a/pkg/commentThread/commentThread.go +++ b/pkg/commentThread/commentThread.go @@ -3,11 +3,12 @@ package commentThread import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/i18nLanguage/i18nLanguage.go b/pkg/i18nLanguage/i18nLanguage.go index dc8d95d..e5f9949 100644 --- a/pkg/i18nLanguage/i18nLanguage.go +++ b/pkg/i18nLanguage/i18nLanguage.go @@ -2,11 +2,12 @@ package i18nLanguage import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/i18nRegion/i18nRegion.go b/pkg/i18nRegion/i18nRegion.go index 5792ce6..2d55e0b 100644 --- a/pkg/i18nRegion/i18nRegion.go +++ b/pkg/i18nRegion/i18nRegion.go @@ -2,11 +2,12 @@ package i18nRegion import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/member/member.go b/pkg/member/member.go index 4ef2fdb..c8733ec 100644 --- a/pkg/member/member.go +++ b/pkg/member/member.go @@ -2,11 +2,12 @@ package member import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/membershipsLevel/membershipsLevel.go b/pkg/membershipsLevel/membershipsLevel.go index a65d51f..f1c9a87 100644 --- a/pkg/membershipsLevel/membershipsLevel.go +++ b/pkg/membershipsLevel/membershipsLevel.go @@ -2,11 +2,12 @@ package membershipsLevel import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/playlist/playlist.go b/pkg/playlist/playlist.go index 88683a6..b0dc57b 100644 --- a/pkg/playlist/playlist.go +++ b/pkg/playlist/playlist.go @@ -3,11 +3,12 @@ package playlist import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/playlist/playlist_test.go b/pkg/playlist/playlist_test.go index f29961d..2d74be8 100644 --- a/pkg/playlist/playlist_test.go +++ b/pkg/playlist/playlist_test.go @@ -1,9 +1,10 @@ package playlist import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewPlaylist(t *testing.T) { diff --git a/pkg/playlistImage/playlistImage.go b/pkg/playlistImage/playlistImage.go index 90029c7..0a76051 100644 --- a/pkg/playlistImage/playlistImage.go +++ b/pkg/playlistImage/playlistImage.go @@ -3,12 +3,13 @@ package playlistImage import ( "errors" "fmt" + "io" + "os" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" - "os" ) var ( diff --git a/pkg/playlistItem/playlistItem.go b/pkg/playlistItem/playlistItem.go index deb3a68..a96a26d 100644 --- a/pkg/playlistItem/playlistItem.go +++ b/pkg/playlistItem/playlistItem.go @@ -3,11 +3,12 @@ package playlistItem import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/search/search.go b/pkg/search/search.go index e33fbe2..7197164 100644 --- a/pkg/search/search.go +++ b/pkg/search/search.go @@ -2,11 +2,12 @@ package search import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/search/search_test.go b/pkg/search/search_test.go index f730e90..44d3c20 100644 --- a/pkg/search/search_test.go +++ b/pkg/search/search_test.go @@ -1,9 +1,10 @@ package search import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewSearch(t *testing.T) { diff --git a/pkg/subscription/subscription.go b/pkg/subscription/subscription.go index a352d17..f46c019 100644 --- a/pkg/subscription/subscription.go +++ b/pkg/subscription/subscription.go @@ -3,11 +3,12 @@ package subscription import ( "errors" "fmt" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/subscription/subscription_test.go b/pkg/subscription/subscription_test.go index d1b4255..0386488 100644 --- a/pkg/subscription/subscription_test.go +++ b/pkg/subscription/subscription_test.go @@ -1,9 +1,10 @@ package subscription import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewSubscription(t *testing.T) { diff --git a/pkg/superChatEvent/superChatEvent.go b/pkg/superChatEvent/superChatEvent.go index cbf366a..7d94338 100644 --- a/pkg/superChatEvent/superChatEvent.go +++ b/pkg/superChatEvent/superChatEvent.go @@ -2,11 +2,12 @@ package superChatEvent import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/thumbnail/thumbnail.go b/pkg/thumbnail/thumbnail.go index 78d8e0a..339f2fc 100644 --- a/pkg/thumbnail/thumbnail.go +++ b/pkg/thumbnail/thumbnail.go @@ -3,11 +3,12 @@ package thumbnail import ( "errors" "fmt" + "io" + "os" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "google.golang.org/api/youtube/v3" - "io" - "os" ) var ( diff --git a/pkg/video/video.go b/pkg/video/video.go index e2a2a75..b246a40 100644 --- a/pkg/video/video.go +++ b/pkg/video/video.go @@ -3,13 +3,14 @@ package video import ( "errors" "fmt" + "io" + "os" + "slices" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/playlistItem" "github.com/eat-pray-ai/yutu/pkg/thumbnail" "github.com/jedib0t/go-pretty/v6/table" - "io" - "os" - "slices" "github.com/eat-pray-ai/yutu/pkg/utils" "google.golang.org/api/youtube/v3" diff --git a/pkg/video/video_test.go b/pkg/video/video_test.go index 5148308..2640683 100644 --- a/pkg/video/video_test.go +++ b/pkg/video/video_test.go @@ -1,9 +1,10 @@ package video import ( - "github.com/eat-pray-ai/yutu/pkg/utils" "reflect" "testing" + + "github.com/eat-pray-ai/yutu/pkg/utils" ) func TestNewVideo(t *testing.T) { diff --git a/pkg/videoAbuseReportReason/videoAbuseReportReason.go b/pkg/videoAbuseReportReason/videoAbuseReportReason.go index 24a5b90..2a04918 100644 --- a/pkg/videoAbuseReportReason/videoAbuseReportReason.go +++ b/pkg/videoAbuseReportReason/videoAbuseReportReason.go @@ -2,11 +2,12 @@ package videoAbuseReportReason import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/videoCategory/videoCategory.go b/pkg/videoCategory/videoCategory.go index 8482a9c..4fbbe1d 100644 --- a/pkg/videoCategory/videoCategory.go +++ b/pkg/videoCategory/videoCategory.go @@ -2,11 +2,12 @@ package videoCategory import ( "errors" + "io" + "github.com/eat-pray-ai/yutu/pkg/auth" "github.com/eat-pray-ai/yutu/pkg/utils" "github.com/jedib0t/go-pretty/v6/table" "google.golang.org/api/youtube/v3" - "io" ) var ( diff --git a/pkg/watermark/watermark.go b/pkg/watermark/watermark.go index d2cdce8..2fa4bb8 100644 --- a/pkg/watermark/watermark.go +++ b/pkg/watermark/watermark.go @@ -3,10 +3,11 @@ package watermark import ( "errors" "fmt" - "github.com/eat-pray-ai/yutu/pkg/auth" - "google.golang.org/api/youtube/v3" "io" "os" + + "github.com/eat-pray-ai/yutu/pkg/auth" + "google.golang.org/api/youtube/v3" ) var (