(funcName string, arg ast.Expr)
| 897 | } |
| 898 | |
| 899 | func checkInvalidArgLiteral(funcName string, arg ast.Expr) error { |
| 900 | if !isNumericArgType(arg) { |
| 901 | return fmt.Errorf("%s simple literal arguments must be numeric", funcName) |
| 902 | } |
| 903 | return nil |
| 904 | } |
| 905 | |
| 906 | func isNumericArgType(arg ast.Expr) bool { |
| 907 | switch arg.Kind() { |
no test coverage detected