rmbolger/Posh-IBWAPI

Multiple definitions of "Base"

Closed this issue · 2 comments

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.

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.

Fixed with version 1.2.1.