0xAX / notificator

Desktop notifications with golang
BSD 3-Clause "New" or "Revised" License
444 stars 46 forks source link

simple refactoring ) #2

Closed kshvakov closed 10 years ago

kshvakov commented 10 years ago

And don't use reflect for detect type

n := reflect.TypeOf(notificator).String() // check notificator if n == "*notification.gnomeNotificator" { ...

use type switch

Example: https://github.com/kshvakov/notificator/tree/use-switch-type

best regards, Kirill

0xAX commented 10 years ago

Thank you @kshvakov, merged.