From a649369e803f2db70f2ac3a12560cd3445881a2f Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Fri, 22 Nov 2019 11:45:31 -0800 Subject: [PATCH] Remove temporary artifacts created by mockgen --- .../utils/gomock_reflect_069400606/prog.go | 64 ------------------- .../utils/gomock_reflect_579506979/prog.go | 64 ------------------- 2 files changed, 128 deletions(-) delete mode 100644 internal/utils/gomock_reflect_069400606/prog.go delete mode 100644 internal/utils/gomock_reflect_579506979/prog.go diff --git a/internal/utils/gomock_reflect_069400606/prog.go b/internal/utils/gomock_reflect_069400606/prog.go deleted file mode 100644 index 51bc1866e..000000000 --- a/internal/utils/gomock_reflect_069400606/prog.go +++ /dev/null @@ -1,64 +0,0 @@ -package main - -import ( - "encoding/gob" - "flag" - "fmt" - "os" - "path" - "reflect" - - "github.com/golang/mock/mockgen/model" - - pkg_ "github.com/ethereum/go-ethereum/log" -) - -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 - }{ - - {"Logger", reflect.TypeOf((*pkg_.Logger)(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/ethereum/go-ethereum/log"), - } - - 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) - } -} diff --git a/internal/utils/gomock_reflect_579506979/prog.go b/internal/utils/gomock_reflect_579506979/prog.go deleted file mode 100644 index e8df721e9..000000000 --- a/internal/utils/gomock_reflect_579506979/prog.go +++ /dev/null @@ -1,64 +0,0 @@ -package main - -import ( - "encoding/gob" - "flag" - "fmt" - "os" - "path" - "reflect" - - "github.com/golang/mock/mockgen/model" - - pkg_ "github.com/ethereum/go-ethereum/log" -) - -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 - }{ - - {"Handler", reflect.TypeOf((*pkg_.Handler)(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/ethereum/go-ethereum/log"), - } - - 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) - } -}