(raw string)
| 1333 | } |
| 1334 | |
| 1335 | func parseOptionalMemoryType(raw string) (memcontract.Type, error) { |
| 1336 | typ := memcontract.Type(strings.TrimSpace(raw)).Normalize() |
| 1337 | if typ == "" { |
| 1338 | return "", nil |
| 1339 | } |
| 1340 | if err := typ.Validate(); err != nil { |
| 1341 | return "", err |
| 1342 | } |
| 1343 | return typ, nil |
| 1344 | } |
| 1345 | |
| 1346 | func resolveMemoryContent(cmd *cobra.Command, deps commandDeps, raw string) (string, error) { |
| 1347 | flag := cmd.Flags().Lookup(memoryContentKey) |