Skip to content

can't generate query sets on Windows #18

Closed
@JermineHu

Description

@JermineHu

My ENV:
go version go1.9.2 windows/amd64

My Code Path:

E:\GOPATH\src\test\models.go

My question :
To excute go generate ./... got a failure info : can't generate query sets: can't parse file models.go to get structs: can't load types for file models.go in package "./." But in Desktop dictionary path “test/models.go” to excute go generate ./... was successful !

The code :

import "github.com/jinzhu/gorm"

//go:generate goqueryset -in models.go
// User struct represent user model. Next line (gen:qs) is needed to autogenerate UserQuerySet.
// gen:qs
type User struct {
	gorm.Model
	Rating      int
	RatingMarks int
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions