String serializes all of the checks recorded, using the following syntax:
()
| 918 | |
| 919 | // String serializes all of the checks recorded, using the following syntax: |
| 920 | func (r *AuthzCheckRecorder) String() string { |
| 921 | r.lock.Lock() |
| 922 | defer r.lock.Unlock() |
| 923 | |
| 924 | if len(r.checks) == 0 { |
| 925 | return "nil" |
| 926 | } |
| 927 | |
| 928 | checks := make([]string, 0, len(r.checks)) |
| 929 | for _, check := range r.checks { |
| 930 | checks = append(checks, fmt.Sprintf("%v=%v", check.name, check.result)) |
| 931 | } |
| 932 | return strings.Join(checks, "; ") |
| 933 | } |
no test coverage detected