WarnOnAny tells the compiler to warn if expression return any type.
()
| 119 | |
| 120 | // WarnOnAny tells the compiler to warn if expression return any type. |
| 121 | func WarnOnAny() Option { |
| 122 | return func(c *conf.Config) { |
| 123 | if c.Expect == reflect.Invalid { |
| 124 | panic("WarnOnAny() works only with combination with AsInt(), AsBool(), etc. options") |
| 125 | } |
| 126 | c.ExpectAny = false |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | // Optimize turns optimizations on or off. |
| 131 | func Optimize(b bool) Option { |
no outgoing calls
searching dependent graphs…