Skip to content

Commit

Permalink
fix: api changes for services in next
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel committed May 14, 2021
1 parent 80c2c21 commit b2cc2df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions pkg/services/generic/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/containrrr/shoutrrr/pkg/services/standard"
"github.com/containrrr/shoutrrr/pkg/types"
"io"
"log"
"net/http"
"net/url"
"strings"
Expand Down Expand Up @@ -36,7 +35,7 @@ func (service *Service) Send(message string, params *types.Params) error {
}

// Initialize loads ServiceConfig from configURL and sets logger for this Service
func (service *Service) Initialize(configURL *url.URL, logger *log.Logger) error {
func (service *Service) Initialize(configURL *url.URL, logger types.StdLogger) error {
service.Logger.SetLogger(logger)
config, pkr := DefaultConfig()
service.config = config
Expand Down
3 changes: 1 addition & 2 deletions pkg/services/matrix/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/containrrr/shoutrrr/pkg/format"
"github.com/containrrr/shoutrrr/pkg/services/standard"
t "github.com/containrrr/shoutrrr/pkg/types"
"log"
"net/url"
)

Expand All @@ -21,7 +20,7 @@ type Service struct {
}

// Initialize loads ServiceConfig from configURL and sets logger for this Service
func (s *Service) Initialize(configURL *url.URL, logger *log.Logger) error {
func (s *Service) Initialize(configURL *url.URL, logger t.StdLogger) error {
s.SetLogger(logger)
s.config = &Config{}

Expand Down
6 changes: 3 additions & 3 deletions pkg/services/matrix/matrix_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/containrrr/shoutrrr/pkg/types"
"io/ioutil"
"log"
"net/http"
"net/url"
"strings"
Expand All @@ -14,10 +14,10 @@ import (
type client struct {
apiURL url.URL
accessToken string
logger *log.Logger
logger types.StdLogger
}

func newClient(host string, disableTLS bool, logger *log.Logger) (c *client) {
func newClient(host string, disableTLS bool, logger types.StdLogger) (c *client) {
c = &client{
logger: logger,
apiURL: url.URL{
Expand Down

0 comments on commit b2cc2df

Please sign in to comment.