Skip to content

Check if specific type name has a valid syntax #72

@alexey-sveshnikov

Description

@alexey-sveshnikov

Hi!

Looks like I misunderstood the concepts of genny and passed a specific type with a package name as genny arguments. The problem is that an error message is not pointed to the cause directly it's not trivial to debug. Actually, I resorted to binary search to figure it out.

Code:

//go:generate genny -pkg=test -in=../templates/main.go -out=main.go gen "MyType=package.SpecificType"

Error:

Failed to goimports the generated code: ../templates/main.go:10:12: expected type, found '.' (and 1 more errors)
main.go:3: running "genny": exit status 4

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