mirror of
https://github.com/crazy-max/diun.git
synced 2025-01-12 03:28:12 +00:00
5983df6491
Updates golangci-lint and updates to the correct config format. Also renames some unused parameters to `_` to appese `revive`.
30 lines
510 B
Go
30 lines
510 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/crazy-max/diun/v4/pb"
|
|
)
|
|
|
|
// NotifCmd holds notif command
|
|
type NotifCmd struct {
|
|
Test NotifTestCmd `kong:"cmd,help='Test notification settings.'"`
|
|
}
|
|
|
|
// NotifTestCmd holds notif test command
|
|
type NotifTestCmd struct {
|
|
CliGlobals
|
|
}
|
|
|
|
func (s *NotifTestCmd) Run(_ *Context) error {
|
|
defer s.conn.Close()
|
|
|
|
nt, err := s.notifSvc.NotifTest(context.Background(), &pb.NotifTestRequest{})
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
fmt.Println(nt.Message)
|
|
return nil
|
|
}
|