Skip to content

Giving multiple types that all appear in the same file causes duplication in the generated code #9

@benbarbour

Description

@benbarbour
//go:generate jsonenums -type=A,B

package main

type A int
const (
   X A = iota
   Y
   Z
)

type B int 
const (
   M B = iota
   N
   O
)

After running "go generate" a_jsonenums.go contains the correct definitions for type A, but b_jsonenums.go has the definitions for both type A and type B.

What I would like best is a way to dump all of the generated json into just one fil like stringer's -o flag allows me to do.

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