diff --git a/plugin/servergen/server.go b/plugin/servergen/server.go index e430310c539..05fe885fcd6 100644 --- a/plugin/servergen/server.go +++ b/plugin/servergen/server.go @@ -29,7 +29,7 @@ func (m *Plugin) GenerateCode(data *codegen.Data) error { ResolverPackageName: data.Config.Resolver.ImportPath(), } - if _, err := os.Stat(m.filename); os.IsNotExist(errors.Unwrap(err)) { + if _, err := os.Stat(m.filename); errors.Is(err, fs.ErrNotExist) { return templates.Render(templates.Options{ PackageName: "main", Filename: m.filename,