(k string, t StaticType, allowUnsafe bool)
| 105 | } |
| 106 | |
| 107 | func (h *Hints) Get(k string, t StaticType, allowUnsafe bool) (v Static, ok bool) { |
| 108 | if h == nil { |
| 109 | return |
| 110 | } |
| 111 | |
| 112 | if isUnsafe(k) && !allowUnsafe { |
| 113 | return |
| 114 | } |
| 115 | |
| 116 | for _, hh := range h.Hints { |
| 117 | if hh.Name == k && hh.Value.Type == t { |
| 118 | return hh.Value, true |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | return |
| 123 | } |
| 124 | |
| 125 | var _ Element = (*Hints)(nil) |
no test coverage detected