IsDeprecated determines if the given field is deprecated.
(f Field)
| 89 | |
| 90 | // IsDeprecated determines if the given field is deprecated. |
| 91 | func IsDeprecated(f Field) (bool, *Deprecation) { |
| 92 | for _, field := range fields { |
| 93 | if field.Field == f && field.IsDeprecated() { |
| 94 | return true, field.Deprecation |
| 95 | } |
| 96 | } |
| 97 | return false, nil |
| 98 | } |
| 99 | |
| 100 | // IsBoolean determines if the given field has the bool type. |
| 101 | func IsBoolean(f Field) bool { |