func unitMatchExposure(u *state.Unit, patterns []string) (bool, bool, error) { s, err := u.Application() if err != nil { return false, false, err } return matchExposure(patterns, s) }