ParseOptionalMemoryScope validates an optional memory scope value.
(raw string)
| 2516 | |
| 2517 | // ParseOptionalMemoryScope validates an optional memory scope value. |
| 2518 | func ParseOptionalMemoryScope(raw string) (memcontract.Scope, error) { |
| 2519 | return parseOptionalMemoryScope(raw) |
| 2520 | } |
| 2521 | |
| 2522 | func parseOptionalMemoryScope(raw string) (memcontract.Scope, error) { |
| 2523 | scope := memcontract.Scope(strings.TrimSpace(raw)).Normalize() |