Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

ReportListFilter with false AtNull values #20

@nferch

Description

@nferch

Hi,

If you create a ReportListFilter with a false ...AtNull attribute, the attribute is not passed to the API. For example, this does not work:

        filter := h1.ReportListFilter{
                BountyAwardedAtNull: false,
                Program:             []string{"spotify"},
        }

This is because go-querystring considers false values to be empty: https://github.com/google/go-querystring/blob/master/query/encode.go#L53

I worked around this by changing the bool values in ReportListFilter to pointer to bool, but this is pretty ugly especially since you can't create a literal pointer to false in Go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions