Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder: don't use setParamIfDefined on bools #225

Merged
merged 1 commit into from
Sep 12, 2023

Commits on Sep 12, 2023

  1. builder: don't use setParamIfDefined on bools

    The `setDeviceParamIfDefined' function only works on strings, and checks
    that the value is not empty before adding the parameter to the request.
    
    In the builder code, in several places, there are some instances of
    booleans being converted to strings using `strconv.FormatBool', and then
    calling `setDeviceParamIfDefined' with this value, meaning that the
    value always gets set in the request.
    
    This commit removes those instances in favour of a manual boolean check,
    which can result in adding the parameter to the request only if it is
    set to true.
    lbajolet-hashicorp committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    1e1d239 View commit details
    Browse the repository at this point in the history