Skip to content

Commit

Permalink
make it clear that a function has a side effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Jones committed Apr 26, 2019
1 parent a1c1465 commit 9744def
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bosh/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func New(config config.ConfigView, outputs terraform.Outputs, stdout, stderr io.
return nil, err
}

boshCLIPath, err := resource.BOSHCLIPath()
boshCLIPath, err := resource.DownloadBOSHCLI()
if err != nil {
return nil, fmt.Errorf("failed to determine BOSH CLI path: [%v]", err)
}
Expand Down
8 changes: 4 additions & 4 deletions resource/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ func (p binaryPaths) path() string {
}
}

// BOSHCLIPath returns the path of the downloaded bosh-cli
func BOSHCLIPath() (string, error) {
// DownloadBOSHCLI returns the path of the downloaded bosh-cli
func DownloadBOSHCLI() (string, error) {
p := binaries["bosh-cli"].path()
return bincache.Download(p)
}

// TerraformCLIPath returns the path of the downloaded terraform-cli
func TerraformCLIPath() (string, error) {
// DownloadTerraformCLI returns the path of the downloaded terraform-cli
func DownloadTerraformCLI() (string, error) {
p := binaries["terraform"].path()
return bincache.Download(p)
}
2 changes: 1 addition & 1 deletion terraform/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func Path(path string) Option {
// DownloadTerraform returns the dowloaded CLI path Option
func DownloadTerraform() Option {
return func(c *CLI) error {
path, err := resource.TerraformCLIPath()
path, err := resource.DownloadTerraformCLI()
c.Path = path
return err
}
Expand Down

0 comments on commit 9744def

Please sign in to comment.