From d434e5b623b7df47baca6c8e42c8350d002d6f9f Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 21 Mar 2021 14:02:44 +0100 Subject: [PATCH] Fix: Use of unexported method Signed-off-by: Knut Ahlers --- msgformatter.go | 2 +- twitch.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msgformatter.go b/msgformatter.go index d0cd9c7..3a590f4 100644 --- a/msgformatter.go +++ b/msgformatter.go @@ -56,7 +56,7 @@ func formatMessage(tplString string, m *irc.Message, r *rule, fields map[string] } messageFunctions["recentGame"] = func(username string, v ...string) (string, error) { - game, _, err := twitch.getRecentStreamInfo(strings.TrimLeft(username, "#")) + game, _, err := twitch.GetRecentStreamInfo(strings.TrimLeft(username, "#")) if err != nil && len(v) > 0 { return v[0], nil } diff --git a/twitch.go b/twitch.go index c426b68..ed15cdb 100644 --- a/twitch.go +++ b/twitch.go @@ -101,7 +101,7 @@ func (t twitchClient) getIDForUsername(username string) (string, error) { return payload.Data[0].ID, nil } -func (t twitchClient) getRecentStreamInfo(username string) (string, string, error) { +func (t twitchClient) GetRecentStreamInfo(username string) (string, string, error) { ctx, cancel := context.WithTimeout(context.Background(), twitchRequestTimeout) defer cancel()