From f50c1b9d1bab5e77d387c5b3b48e7654a3f9b487 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Mon, 27 Jul 2015 22:46:13 +0100 Subject: [PATCH] Fixing build issues --- main.go | 2 +- service_youtube.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 376acb8..4f28da0 100644 --- a/main.go +++ b/main.go @@ -155,7 +155,7 @@ var services []*Service func main() { PerformStartupChecks() - services = []*Service{Youtube{}} + services = []Service{new(Youtube)} if currentUser, err := user.Current(); err == nil { dj.homeDir = currentUser.HomeDir diff --git a/service_youtube.go b/service_youtube.go index 18f8f6d..67aefb7 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -33,12 +33,12 @@ type YouTube struct { } // Name of the service -func (y Youtube) ServiceName() string { +func (y *Youtube) ServiceName() string { return "Youtube" } // Checks to see if service will accept URL -func (y Youtube) 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 +62,7 @@ func (y Youtube) URLRegex(url string) bool { } // Creates the requested song/playlist and adds to the queue -func (y Youtube) NewRequest(user *gumble.User, url string) { +func (y *Youtube) NewRequest(user *gumble.User, url string) { }