TODO MODIFIED copypasta from gh api
(v string, opts RunOptions)
| 155 | |
| 156 | // TODO MODIFIED copypasta from gh api |
| 157 | func magicFieldValue(v string, opts RunOptions) (string, error) { |
| 158 | if strings.HasPrefix(v, "@") { |
| 159 | fileBytes, err := opts.IO.ReadUserFile(v[1:]) |
| 160 | if err != nil { |
| 161 | return "", err |
| 162 | } |
| 163 | return string(fileBytes), nil |
| 164 | } |
| 165 | |
| 166 | return v, nil |
| 167 | } |
| 168 | |
| 169 | // TODO copypasta from gh api |
| 170 | func parseFields(opts RunOptions) (map[string]string, error) { |