parseMaxBytesOption validates and parses the --max-bytes flag value. It stores the parsed result in parsedMaxBytes for child commands to use.
()
| 136 | // parseMaxBytesOption validates and parses the --max-bytes flag value. |
| 137 | // It stores the parsed result in parsedMaxBytes for child commands to use. |
| 138 | func parseMaxBytesOption() error { |
| 139 | parsedMaxBytes = nil |
| 140 | if maxBytesCASBackendOption == "" { |
| 141 | return nil |
| 142 | } |
| 143 | |
| 144 | bytes, err := bytefmt.ToBytes(maxBytesCASBackendOption) |
| 145 | if err != nil { |
| 146 | return fmt.Errorf("invalid max-bytes format: %w", err) |
| 147 | } |
| 148 | |
| 149 | bytesInt := int64(bytes) |
| 150 | parsedMaxBytes = &bytesInt |
| 151 | return nil |
| 152 | } |
| 153 | |
| 154 | // captureUpdateFlags reads the --default, --fallback, and --description flags only when explicitly set and |
| 155 | // stores their values in the package-level pointer options. This avoids treating their zero |
no outgoing calls
no test coverage detected