rmbolger / Posh-IBWAPI

PowerShell module for interacting with the Infoblox WAPI (REST API).
MIT License
54 stars 8 forks source link

Multiple definitions of "Base" #22

Closed AspenForester closed 6 years ago

AspenForester commented 6 years ago

Among the Private functions, you define base.ps1, and call it from six of the public functions. But in private function format-columns.ps1, you define a helper function "base" as a one-liner proxying [math]::floor(). While functionally legal, neither the latter, nor its partner "Max" seem to provide format-column's code with any more clarity.

rmbolger commented 6 years ago

Good catch.

I recall being conflicted about putting the functionality of Base.ps1 into its own function. At the time, I liked the brevity of just splatting @opts into it. But in retrospect, it might make more sense to get rid of it and just have a centrally defined format string like "https://{0}/wapi/v{1}/" to use with native string formatting from each public function. At the very least, I can give it a better name.

As for format-columns.ps1, that whole function was written by another author and I was trying to leave it largely intact except for functional changes I needed. But I may end up going back and refactoring it a bit as well.

rmbolger commented 6 years ago

Fixed with version 1.2.1.