From eb686f59c5e79c7e9b59e0307a65c27ad9bd8bf8 Mon Sep 17 00:00:00 2001 From: Matthew Mueller Date: Tue, 7 Feb 2023 00:12:11 -0600 Subject: [PATCH] framework/afs: remove unused dep --- framework/afs/afs.go | 6 ++---- framework/transpiler/transpiler.go | 6 ++---- internal/cli/cli.go | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/framework/afs/afs.go b/framework/afs/afs.go index aa28a780..a4a9a438 100644 --- a/framework/afs/afs.go +++ b/framework/afs/afs.go @@ -5,7 +5,6 @@ import ( "fmt" "io/fs" - "github.com/livebud/bud/framework" "github.com/livebud/bud/internal/bail" "github.com/livebud/bud/internal/gotemplate" "github.com/livebud/bud/internal/imports" @@ -24,12 +23,11 @@ func Generate(state *State) ([]byte, error) { return generator.Generate(state) } -func New(flag *framework.Flag, injector *di.Injector, log log.Log, module *gomod.Module) *Generator { - return &Generator{flag, injector, log, module} +func New(injector *di.Injector, log log.Log, module *gomod.Module) *Generator { + return &Generator{injector, log, module} } type Generator struct { - flag *framework.Flag injector *di.Injector log log.Log module *gomod.Module diff --git a/framework/transpiler/transpiler.go b/framework/transpiler/transpiler.go index f9e31637..48a084cc 100644 --- a/framework/transpiler/transpiler.go +++ b/framework/transpiler/transpiler.go @@ -6,7 +6,6 @@ import ( "path/filepath" "strings" - "github.com/livebud/bud/framework" "github.com/livebud/bud/internal/gotemplate" "github.com/livebud/bud/internal/imports" "github.com/livebud/bud/internal/valid" @@ -25,12 +24,11 @@ var template string var generator = gotemplate.MustParse("framework/transpiler/transpiler.gotext", template) // New transpiler generator -func New(flag *framework.Flag, log log.Log, module *gomod.Module, parser *parser.Parser) *Generator { - return &Generator{flag, log, module, parser} +func New(log log.Log, module *gomod.Module, parser *parser.Parser) *Generator { + return &Generator{log, module, parser} } type Generator struct { - flag *framework.Flag log log.Log module *gomod.Module parser *parser.Parser diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 3ce2e747..0bc9ac55 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -351,9 +351,9 @@ func (c *CLI) genFS(cache genfs.Cache, flag *framework.Flag, log log.Log, module genfs := genfs.New(cache, fsys, log) parser := parser.New(genfs, module) injector := di.New(genfs, log, module, parser) - genfs.FileGenerator("bud/internal/generator/transpiler/transpiler.go", transpiler.New(flag, log, module, parser)) + genfs.FileGenerator("bud/internal/generator/transpiler/transpiler.go", transpiler.New(log, module, parser)) genfs.FileGenerator("bud/internal/generator/generator.go", generator.New(log, module, parser)) - genfs.FileGenerator("bud/cmd/afs/main.go", afs.New(flag, injector, log, module)) + genfs.FileGenerator("bud/cmd/afs/main.go", afs.New(injector, log, module)) return genfs }