From 3f9613e0f3ba5aab6dbcff036844d129fd5f3cdc Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Mon, 27 Jul 2015 22:34:35 +0100 Subject: [PATCH] Fixing build issues --- service.go | 4 ---- service_youtube.go | 12 ++++++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/service.go b/service.go index b1e8ff2..4c4a03b 100644 --- a/service.go +++ b/service.go @@ -48,7 +48,3 @@ type Playlist interface { ID() string Title() string } - -var services = []Service{ - new(*YoutubeService), -} diff --git a/service_youtube.go b/service_youtube.go index 4abd1f6..b99d48f 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -29,16 +29,20 @@ import ( // YOUTUBE SERVICE // --------------- -type YouTubeService struct { +var services = []Service{ + Youtube{}, +} + +type YouTube struct { } // Name of the service -func (yt YoutubeService) ServiceName() string { +func (y Youtube) ServiceName() string { return "Youtube" } // Checks to see if service will accept URL -func (yt YoutubeService) URLRegex(url string) bool { +func (y Youtube) URLRegex(url string) bool { youtubePatterns := []string{ `https?:\/\/www\.youtube\.com\/watch\?v=([\w-]+)(\&t=\d*m?\d*s?)?`, `https?:\/\/youtube\.com\/watch\?v=([\w-]+)(\&t=\d*m?\d*s?)?`, @@ -62,7 +66,7 @@ func (yt YoutubeService) URLRegex(url string) bool { } // Creates the requested song/playlist and adds to the queue -func (yt YoutubeService) NewRequest(user *gumble.User, url string) { +func (y Youtube) NewRequest(user *gumble.User, url string) { }