gojsonsum

package
v0.0.0-...-aa0ee38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CodeTemplate string

Functions

func ParseDefinitionComments

func ParseDefinitionComments(r io.Reader) ([][]string, error)

func Render

func Render(pkg string, args []SumTypeDef) (string, error)

Render renders the code template

Types

type SumTypeDef

type SumTypeDef struct {
	TypeName      string
	TypeMap       map[string]string
	Opts          SumTypeOptions
	Discriminator string
}

func ParseSumTypeDef

func ParseSumTypeDef(input []string) SumTypeDef

type SumTypeOptions

type SumTypeOptions struct {
	Tag  string
	Name string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL