Bool gets the argument at the specified index. Panics if there is no argument, or if the argument is of the wrong type.
(index int)
| 1133 | // Bool gets the argument at the specified index. Panics if there is no argument, or |
| 1134 | // if the argument is of the wrong type. |
| 1135 | func (args Arguments) Bool(index int) bool { |
| 1136 | var s bool |
| 1137 | var ok bool |
| 1138 | if s, ok = args.Get(index).(bool); !ok { |
| 1139 | panic(fmt.Sprintf("assert: arguments: Bool(%d) failed because object wasn't correct type: %v", index, args.Get(index))) |
| 1140 | } |
| 1141 | return s |
| 1142 | } |
| 1143 | |
| 1144 | func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { |
| 1145 | t := reflect.TypeOf(v) |