Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

How to ignore / bypass a field in a struct which I don't own / no control? #344

Open
@tigerinus

Description

@tigerinus

Hello,

I need to decode the a JSON supposed to be the type (ProxyTransport) from the frp project:

https://github.com/fatedier/frp/blob/v0.52.3/pkg/config/v1/proxy.go#L40

Its field BandwidthLimit is expected to be of type types.BandwidthQuantity.

But the actual value is an empty string ""

I don't own this project. I don't want to clone the struct and keep maintaining it.

Is there a way to bypass this field so the rest of the struct can be decoded?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions