Skip to content

Commit

Permalink
solve
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Mar 8, 2024
1 parent a0c59ef commit 394bcd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/onesignal.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ func (p onesignalMessenger) Close() error {

// NewOneSignal creates new instance of pinpoint
func NewOneSignal(cfg []byte, l *onelog.Logger) (Messenger, error) {
var c pinpointCfg
var c onesignalCfg
if err := json.Unmarshal(cfg, &c); err != nil {

Check failure on line 46 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: json

Check failure on line 46 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: json

Check failure on line 46 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: json

Check failure on line 46 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: json
return nil, err
}

if c.AppID == "" {
return nil, fmt.Errorf("invalid app_id")

Check failure on line 51 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: fmt

Check failure on line 51 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: fmt

Check failure on line 51 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: fmt

Check failure on line 51 in lib/onesignal.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: fmt
}
//
return onesignalMessenger{
cfg: c,
Expand Down

0 comments on commit 394bcd7

Please sign in to comment.