ParseProduct attempts to convert a string to a Product.
(name string)
| 56 | |
| 57 | // ParseProduct attempts to convert a string to a Product. |
| 58 | func ParseProduct(name string) (Product, error) { |
| 59 | if x, ok := _ProductValue[name]; ok { |
| 60 | return x, nil |
| 61 | } |
| 62 | return Product(0), fmt.Errorf("%s is %w", name, ErrInvalidProduct) |
| 63 | } |
searching dependent graphs…