PolicyClientOrDefault returns the policy client if set or a no-op default otherwise. It always returns a non-nil value.
()
| 204 | // PolicyClientOrDefault returns the policy client if set or a no-op default |
| 205 | // otherwise. It always returns a non-nil value. |
| 206 | func (s *System) PolicyClientOrDefault() policyclient.Client { |
| 207 | if client, ok := s.PolicyClient.GetOK(); ok { |
| 208 | return client |
| 209 | } |
| 210 | return policyclient.Get() |
| 211 | } |
| 212 | |
| 213 | // SubSystem represents some subsystem of the Tailscale node daemon. |
| 214 | // |
no test coverage detected