From 972dc5862cd5e1fc6d4e82128391b5fbe054ec8b Mon Sep 17 00:00:00 2001 From: Itamar Yuran Date: Tue, 5 Nov 2024 10:39:36 +0200 Subject: [PATCH] no mock --- pkg/auth/gomock_reflect_4293290132/prog.go | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100644 pkg/auth/gomock_reflect_4293290132/prog.go diff --git a/pkg/auth/gomock_reflect_4293290132/prog.go b/pkg/auth/gomock_reflect_4293290132/prog.go deleted file mode 100644 index fc096224037..00000000000 --- a/pkg/auth/gomock_reflect_4293290132/prog.go +++ /dev/null @@ -1,66 +0,0 @@ - -package main - -import ( - "encoding/gob" - "flag" - "fmt" - "os" - "path" - "reflect" - - "github.com/golang/mock/mockgen/model" - - pkg_ "github.com/treeverse/lakefs/pkg/auth" -) - -var output = flag.String("output", "", "The output file name, or empty to use stdout.") - -func main() { - flag.Parse() - - its := []struct{ - sym string - typ reflect.Type - }{ - - { "ClientWithResponsesInterface", reflect.TypeOf((*pkg_.ClientWithResponsesInterface)(nil)).Elem()}, - - } - pkg := &model.Package{ - // NOTE: This behaves contrary to documented behaviour if the - // package name is not the final component of the import path. - // The reflect package doesn't expose the package name, though. - Name: path.Base("github.com/treeverse/lakefs/pkg/auth"), - } - - for _, it := range its { - intf, err := model.InterfaceFromInterfaceType(it.typ) - if err != nil { - fmt.Fprintf(os.Stderr, "Reflection: %v\n", err) - os.Exit(1) - } - intf.Name = it.sym - pkg.Interfaces = append(pkg.Interfaces, intf) - } - - outfile := os.Stdout - if len(*output) != 0 { - var err error - outfile, err = os.Create(*output) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to open output file %q", *output) - } - defer func() { - if err := outfile.Close(); err != nil { - fmt.Fprintf(os.Stderr, "failed to close output file %q", *output) - os.Exit(1) - } - }() - } - - if err := gob.NewEncoder(outfile).Encode(pkg); err != nil { - fmt.Fprintf(os.Stderr, "gob encode: %v\n", err) - os.Exit(1) - } -}