Skip to content

JSON Parser fails for type override on complex package names #255

Closed
@rupertevill

Description

@rupertevill

The standard syntax for defining a type override in the lib at the moment is:

"overrides": [ { "go_type": "github.com/gofrs/uuid.UUID", "postgres_type": "uuid" } ]

This results in the following import statement and type (in the struct) in the auto gen code:

import (
    "github.com/gofrs/uuid"
)

type test struct {
    columnOne uuid.UUID
}

However, the parser fails if the package name containing the desired type override is more complex, for example "gopkg.in/guregu/null.v3".

Have looked at the parser as it is at the moment and the bug fix doesn't look to bad, let me if you want any contribution 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions