1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-21 19:03:26 +01:00

Remove unnecessary else branch

This commit is contained in:
Philipp Heckel 2022-08-18 21:04:30 -04:00
parent 3aa0eb7d1d
commit 4277d6e4a6

View file

@ -180,15 +180,11 @@ func doSubscribe(c *cli.Context, cl *client.Client, conf *client.Config, topic,
user = s.User
} else if conf.DefaultUser != "" {
user = conf.DefaultUser
} else {
user = ""
}
if s.Password != "" {
password = s.Password
} else if conf.DefaultPassword != "" {
password = conf.DefaultPassword
} else {
password = ""
}
if user != "" && password != "" {
topicOptions = append(topicOptions, client.WithBasicAuth(user, password))