Skip to content

Commit

Permalink
Merge pull request #39 from staticdev/refactor/cobra-coral-revert
Browse files Browse the repository at this point in the history
Revert coral dep
  • Loading branch information
staticdev committed Mar 21, 2022
2 parents e84d40b + 0a6d598 commit 4ac76e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"path/filepath"

"github.com/muesli/coral"
"github.com/spf13/afero"
"github.com/spf13/cobra"
)

type FileIoer interface {
Expand All @@ -23,8 +23,8 @@ func (err CommandError) Error() string {
return err.Msg
}

func RootCmd(fileIo FileIoer, contactClean ContactCleaner) (rootCmd *coral.Command) {
cmd := &coral.Command{
func RootCmd(fileIo FileIoer, contactClean ContactCleaner) (rootCmd *cobra.Command) {
cmd := &cobra.Command{
Use: "cleancontacts <filepath>.vcf",
Short: "Clean Contacts removes fields from your phone contacts to prevent apps for having access more than they need.",
Long: `Do not want to share all your contact info to mobile apps? This software is for you!
Expand All @@ -33,7 +33,7 @@ Export your contacts in VCard format and run the program. BANG! You have a new V
Version: "0.3.0",
Example: `cleancontacts contacts.vcf
cleancontacts /path/contacts.vcf`,
RunE: func(cmd *coral.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
return CommandError{Msg: "Contact file argument not provided."}
}
Expand All @@ -57,6 +57,6 @@ cleancontacts /path/contacts.vcf`,
return cmd
}

func Execute(cmd *coral.Command) error {
func Execute(cmd *cobra.Command) error {
return cmd.Execute()
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.18

require (
github.com/emersion/go-vcard v0.0.0-20210521075357-3445b9171995
github.com/muesli/coral v1.0.0
github.com/spf13/afero v1.8.2
github.com/spf13/cobra v1.4.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/muesli/coral v1.0.0 h1:odyqkoEg4aJAINOzvnjN4tUsdp+Zleccs7tRIAkkYzU=
github.com/muesli/coral v1.0.0/go.mod h1:bf91M/dkp7iHQw73HOoR9PekdTJMTD6ihJgWoDitde8=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand All @@ -136,6 +134,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down

0 comments on commit 4ac76e9

Please sign in to comment.