()
| 152 | } |
| 153 | |
| 154 | func pointerReader() (io.ReadCloser, error) { |
| 155 | if len(pointerCompare) > 0 { |
| 156 | if pointerStdin { |
| 157 | return nil, errors.New(tr.Tr.Get("cannot read from STDIN and --pointer")) |
| 158 | } |
| 159 | |
| 160 | return os.Open(pointerCompare) |
| 161 | } |
| 162 | |
| 163 | requireStdin(tr.Tr.Get("The --stdin flag expects a pointer file from STDIN.")) |
| 164 | |
| 165 | return os.Stdin, nil |
| 166 | } |
| 167 | |
| 168 | func init() { |
| 169 | RegisterCommand("pointer", pointerCommand, func(cmd *cobra.Command) { |
no test coverage detected