(baseTerm ast.BaseTerm)
| 614 | } |
| 615 | |
| 616 | func getStringValue(baseTerm ast.BaseTerm) (string, error) { |
| 617 | constant, ok := baseTerm.(ast.Constant) |
| 618 | if !ok || constant.Type != ast.StringType { |
| 619 | return "", fmt.Errorf("value %v (%T) is not a string", baseTerm, baseTerm) |
| 620 | } |
| 621 | return constant.StringValue() |
| 622 | } |
| 623 | |
| 624 | func getNumberValue(b ast.BaseTerm) (int64, error) { |
| 625 | c, ok := b.(ast.Constant) |
nothing calls this directly
no test coverage detected