diff --git a/cmd/gignore/create.go b/cmd/gignore/create.go index 03233da..f4fe006 100644 --- a/cmd/gignore/create.go +++ b/cmd/gignore/create.go @@ -5,7 +5,6 @@ package main import ( "fmt" - "github.com/onyx-and-iris/gignore" "github.com/spf13/cobra" ) @@ -25,7 +24,7 @@ Example: } for _, arg := range args { - createTemplate(client, arg) + createTemplate(arg) } }, } @@ -36,7 +35,7 @@ func init() { } // createTemplate creates a new .gitignore file using the specified template. -func createTemplate(client *gignore.Client, template string) { +func createTemplate(template string) { err := client.Create(template) cobra.CheckErr(err) fmt.Printf("√ created %s .gitignore file\n", template) diff --git a/cmd/gignore/list.go b/cmd/gignore/list.go index 9c073d9..79a4f0a 100644 --- a/cmd/gignore/list.go +++ b/cmd/gignore/list.go @@ -6,7 +6,6 @@ import ( "fmt" "strings" - "github.com/onyx-and-iris/gignore" "github.com/spf13/cobra" ) @@ -20,7 +19,7 @@ You can use this command to quickly find all available .gitignore templates. Example: gignore --root= list`, Run: func(_ *cobra.Command, _ []string) { - if err := listTemplates(client); err != nil { + if err := listTemplates(); err != nil { cobra.CheckErr(err) } }, @@ -33,7 +32,7 @@ func init() { // listTemplates retrieves and prints all .gitignore templates available from the gignore client. // It takes a gignore.Client as a parameter and returns an error if the operation fails. -func listTemplates(client *gignore.Client) error { +func listTemplates() error { templates, err := client.List() if err != nil { return err