Changed client status shorthand to avoid needless target lookp

This commit is contained in:
2018-08-05 13:38:25 +02:00
parent 4945166148
commit 9aa04bbc10
+1 -6
View File
@@ -446,12 +446,7 @@ func (client *Client) Target(kind string, name string) Target {
// Status gets the client's status target.
func (client *Client) Status() *Status {
target := client.Target("status", "Status")
if target == nil {
return nil
}
return target.(*Status)
return client.status
}
// Channel is a shorthand for getting a channel target and type asserting it.