(opts *SetOptions)
| 163 | } |
| 164 | |
| 165 | func getExpansion(opts *SetOptions) (string, error) { |
| 166 | if opts.Expansion == "-" { |
| 167 | stdin, err := io.ReadAll(opts.IO.In) |
| 168 | if err != nil { |
| 169 | return "", fmt.Errorf("failed to read from STDIN: %w", err) |
| 170 | } |
| 171 | |
| 172 | return string(stdin), nil |
| 173 | } |
| 174 | |
| 175 | return opts.Expansion, nil |
| 176 | } |