Skip to content

Remove unnecessary flush() call in TryToDecodeBase64Gzip function #224

@dilyar85

Description

@dilyar85

Please describe the solution you would like.
In https://github.com/vmware-tanzu/vm-operator/blob/main/pkg/util/enc.go, the TryToDecodeBase64Gzip function currently has a flush() call before close(). This flush() call seems unnecessary because the close() method will call flush() as well, as stated in https://pkg.go.dev/compress/gzip#Writer.Close.

Is there anything else you would like to add?
There are some test specs that use hardcoded strings to test this function. These test specs will also need to be updated when implementing the above change.

Please tell us about your environment.
N/A.

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