mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
entc: drop deprecated packages.LoadSyntax usage (#1039)
This commit is contained in:
@@ -95,7 +95,9 @@ var entInterface = reflect.TypeOf(struct{ ent.Interface }{}).Field(0).Type
|
||||
|
||||
// load loads the schemas info.
|
||||
func (c *Config) load() (string, error) {
|
||||
pkgs, err := packages.Load(&packages.Config{Mode: packages.LoadSyntax}, c.Path, entInterface.PkgPath())
|
||||
pkgs, err := packages.Load(&packages.Config{
|
||||
Mode: packages.NeedName | packages.NeedTypes | packages.NeedTypesInfo,
|
||||
}, c.Path, entInterface.PkgPath())
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("loading package: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user