(options InstallOptions)
| 578 | } |
| 579 | |
| 580 | func normalizeInstallOptions(options InstallOptions) InstallOptions { |
| 581 | options.PluginsDir = strings.TrimSpace(options.PluginsDir) |
| 582 | if options.PluginsDir == "" { |
| 583 | options.PluginsDir = "plugins" |
| 584 | } |
| 585 | options.GOOS = strings.TrimSpace(options.GOOS) |
| 586 | if options.GOOS == "" { |
| 587 | options.GOOS = runtime.GOOS |
| 588 | } |
| 589 | options.GOARCH = strings.TrimSpace(options.GOARCH) |
| 590 | if options.GOARCH == "" { |
| 591 | options.GOARCH = runtime.GOARCH |
| 592 | } |
| 593 | options.GOOS = normalizeGOOS(options.GOOS) |
| 594 | options.GOARCH = normalizeGOARCH(options.GOARCH) |
| 595 | return options |
| 596 | } |
no test coverage detected