Skip to content

Commit

Permalink
Requested Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishanBhalla committed Jan 31, 2021
1 parent 742d127 commit b07e71d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ type Notify struct {
// ErrSendNotification signals that the notifier failed to send a notification.
var ErrSendNotification = errors.New("send notification")

// New returns a new instance of Notify. Defaulting to being not disabled and using the pseudo notification
// service under the hood.
// New returns a new instance of Notify. Defaulting to being not disabled
func New() *Notify {
notifier := &Notify{
Disabled: defaultDisabled,
Expand Down
3 changes: 2 additions & 1 deletion service/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ func New(apiToken string) (*Telegram, error) {
// a given message to all those chats.
func (t *Telegram) AddReceivers(chatIDs ...string) {
for _, v := range chatIDs {
if chatID, err := strconv.ParseInt(v, 10, 64); err != nil {
chatID, err := strconv.ParseInt(v, 10, 64)
if err != nil {
t.chatIDs = append(t.chatIDs, chatID)
}
}
Expand Down
3 changes: 1 addition & 2 deletions use.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package notify

// useService adds a given service to the notifiers services list. If the list still contains
// a pseudo service we remove it before adding the 'real' service.
// useService adds a given service to the notifiers services list.
func (n *Notify) useService(service Notifier) {
if service == nil {
return
Expand Down

0 comments on commit b07e71d

Please sign in to comment.