Skip to content

Embedded structs with - json tag are not ignored #82

@davidnewhall

Description

@davidnewhall

This code produces an error trying to find a type for a member of http.Client.

package main

import (
	"net/http"
	"github.com/tkrajina/typescriptify-golang-structs/typescriptify"
)

type Config struct {
	URL          string `json:"url"`
	APIKey       string `json:"api_key"`
	*http.Client `json:"-"`
}

type Wrapper struct {
	*Config
}

func main() {
	converter := typescriptify.New().Add(Wrapper{})
	err := converter.ConvertToFile("models.ts")
	if err != nil {
		panic(err.Error())
	}
}

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