From 28332a78ab750b6c13d7b3dc843ed27da002bacc Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Mon, 27 Jul 2015 22:24:35 +0100 Subject: [PATCH] Fixing build issues --- service.go | 2 +- service_youtube.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/service.go b/service.go index 1015395..cad8963 100644 --- a/service.go +++ b/service.go @@ -46,5 +46,5 @@ type Playlist interface { } var services = []Service{ - YoutubeService{}, + new(YoutubeService), } diff --git a/service_youtube.go b/service_youtube.go index 67bc4e0..23a9b68 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -32,12 +32,12 @@ type YouTubeService struct { } // Name of the service -func (yt YoutubeService) ServiceName() string { +func (yt *YoutubeService) ServiceName() string { return "Youtube" } // Checks to see if service will accept URL -func (yt YoutubeService) URLRegex(url) bool { +func (yt *YoutubeService) URLRegex(url) 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?)?`, @@ -61,7 +61,7 @@ func (yt YoutubeService) URLRegex(url) bool { } // Creates the requested song/playlist and adds to the queue -func (yt YoutubeService) NewRequest(user, url) { +func (yt *YoutubeService) NewRequest(user, url) { }