DefaultValues sets up the default values for the command.
()
| 224 | |
| 225 | // DefaultValues sets up the default values for the command. |
| 226 | func (c *Command) DefaultValues() { |
| 227 | if c.Output == nil { |
| 228 | c.Output = os.Stdout |
| 229 | } |
| 230 | if c.PkgGetter == nil { |
| 231 | c.PkgGetter = defaultPkgGetter{} |
| 232 | } |
| 233 | if c.PkgDiffer == nil { |
| 234 | c.PkgDiffer = &defaultPkgDiffer{ |
| 235 | DiffType: c.DiffType, |
| 236 | DiffTool: c.DiffTool, |
| 237 | DiffToolOpts: c.DiffToolOpts, |
| 238 | Debug: c.Debug, |
| 239 | Output: c.Output, |
| 240 | } |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | // PkgDiffer knows how to compare given packages. |
| 245 | type PkgDiffer interface { |