diff --git a/cli/cdsctl/config.go b/cli/cdsctl/config.go index 359914e55a..ebf46384bd 100644 --- a/cli/cdsctl/config.go +++ b/cli/cdsctl/config.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "context" "fmt" "os" "path" @@ -195,12 +196,12 @@ func withAutoConf() cli.CommandModifier { ) } -func discoverConf(ctx []cli.Arg) ([]string, error) { +func discoverConf(ctxArg []cli.Arg) ([]string, error) { var needProject, needApplication, needWorkflow bool - // populates needs from ctx - mctx := make(map[string]cli.Arg, len(ctx)) - for _, arg := range ctx { + // populates needs from ctxArg + mctx := make(map[string]cli.Arg, len(ctxArg)) + for _, arg := range ctxArg { mctx[arg.Name] = arg switch arg.Name { case _ProjectKey: @@ -217,29 +218,30 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { } var projectKey, applicationName, workflowName string + ctx := context.Background() // try to find existing .git repository var repoExists bool - r, err := repo.New(".") + r, err := repo.New(ctx, ".") if err == nil { repoExists = true } // if repo exists ask for usage if repoExists { - gitProjectKey, _ := r.LocalConfigGet("cds", "project") - gitApplicationName, _ := r.LocalConfigGet("cds", "application") - gitWorkflowName, _ := r.LocalConfigGet("cds", "workflow") + gitProjectKey, _ := r.LocalConfigGet(ctx, "cds", "project") + gitApplicationName, _ := r.LocalConfigGet(ctx, "cds", "application") + gitWorkflowName, _ := r.LocalConfigGet(ctx, "cds", "workflow") // if all needs were found in git do not ask for confirmation and use the config needConfirmation := (needProject && gitProjectKey == "") || (needApplication && gitApplicationName == "") || (needWorkflow && gitWorkflowName == "") if needConfirmation { - fetchURL, err := r.FetchURL() + fetchURL, err := r.FetchURL(ctx) if err != nil { return nil, errors.Wrap(err, "cannot get url from local git repository") } - name, err := r.Name() + name, err := r.Name(ctx) if err != nil { return nil, errors.Wrap(err, "cannot get name from local git repository") } @@ -250,13 +252,13 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { // if repo exists and is correct get existing config from it's config if repoExists { if needProject { - projectKey, _ = r.LocalConfigGet("cds", "project") + projectKey, _ = r.LocalConfigGet(ctx, "cds", "project") } if needApplication { - applicationName, _ = r.LocalConfigGet("cds", "application") + applicationName, _ = r.LocalConfigGet(ctx, "cds", "application") } if needWorkflow { - workflowName, _ = r.LocalConfigGet("cds", "workflow") + workflowName, _ = r.LocalConfigGet(ctx, "cds", "workflow") } } @@ -270,7 +272,7 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { var projects []sdk.Project if repoExists { - name, err := r.Name() + name, err := r.Name(ctx) if err != nil { return nil, errors.Wrap(err, "cannot get name from current repository") } @@ -340,7 +342,7 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { // set project key and override repository config if exists projectKey = project.Key if repoExists { - if err := r.LocalConfigSet("cds", "project", projectKey); err != nil { + if err := r.LocalConfigSet(ctx, "cds", "project", projectKey); err != nil { return nil, errors.Wrap(err, "cannot set local git configuration") } } @@ -377,7 +379,7 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { if application != nil { applicationName = application.Name if repoExists { - if err := r.LocalConfigSet("cds", "application", applicationName); err != nil { + if err := r.LocalConfigSet(ctx, "cds", "application", applicationName); err != nil { return nil, errors.Wrap(err, "cannot set local git configuration") } } @@ -416,7 +418,7 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { if workflow != nil { workflowName = workflow.Name if repoExists { - if err := r.LocalConfigSet("cds", "workflow", workflowName); err != nil { + if err := r.LocalConfigSet(ctx, "cds", "workflow", workflowName); err != nil { return nil, errors.Wrap(err, "cannot set local git configuration") } } @@ -425,8 +427,8 @@ func discoverConf(ctx []cli.Arg) ([]string, error) { } // for all required context args override or add the value in cli args - preargs := make([]string, len(ctx)) - for i, arg := range ctx { + preargs := make([]string, len(ctxArg)) + for i, arg := range ctxArg { switch arg.Name { case _ProjectKey: preargs[i] = projectKey diff --git a/cli/cdsctl/shell.go b/cli/cdsctl/shell.go index ddf0bada7a..030e4811d0 100644 --- a/cli/cdsctl/shell.go +++ b/cli/cdsctl/shell.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "context" "fmt" "io" "path" @@ -93,19 +94,20 @@ func shellRun(v cli.Values) error { home := "/" + ctx := context.Background() // try to discover conf for existing .git repository - r, errR := repo.New(".") + r, errR := repo.New(ctx, ".") if errR == nil { if _, err := discoverConf([]cli.Arg{ {Name: _ProjectKey}, {Name: _ApplicationName, AllowEmpty: true}, {Name: _WorkflowName, AllowEmpty: true}, }); err == nil { - if proj, _ := r.LocalConfigGet("cds", "project"); proj != "" { + if proj, _ := r.LocalConfigGet(ctx, "cds", "project"); proj != "" { home = "/project/" + proj - if wf, _ := r.LocalConfigGet("cds", "workflow"); wf != "" { + if wf, _ := r.LocalConfigGet(ctx, "cds", "workflow"); wf != "" { home += "/workflow/" + wf - } else if app, _ := r.LocalConfigGet("cds", "application"); app != "" { + } else if app, _ := r.LocalConfigGet(ctx, "cds", "application"); app != "" { home += "/application/" + app } } diff --git a/cli/cdsctl/template_apply.go b/cli/cdsctl/template_apply.go index 9ba87e5f8f..c11d28f10a 100644 --- a/cli/cdsctl/template_apply.go +++ b/cli/cdsctl/template_apply.go @@ -3,6 +3,7 @@ package main import ( "archive/tar" "bytes" + "context" "fmt" "io" "net/http" @@ -180,13 +181,14 @@ func templateApplyRun(v cli.Values) error { // try to find existing .git repository var localRepoURL string var localRepoName string - r, err := repo.New(".") + ctx := context.Background() + r, err := repo.New(ctx, ".") if err == nil { - localRepoURL, err = r.FetchURL() + localRepoURL, err = r.FetchURL(ctx) if err != nil { return err } - localRepoName, err = r.Name() + localRepoName, err = r.Name(ctx) if err != nil { return err } @@ -364,7 +366,7 @@ func templateApplyRun(v cli.Values) error { // store the chosen workflow name to git config if localRepoName != "" { - if err := r.LocalConfigSet("cds", "workflow", workflowName); err != nil { + if err := r.LocalConfigSet(ctx, "cds", "workflow", workflowName); err != nil { return err } } diff --git a/cli/cdsctl/workflow.go b/cli/cdsctl/workflow.go index 43a850a66c..c96211cf14 100644 --- a/cli/cdsctl/workflow.go +++ b/cli/cdsctl/workflow.go @@ -1,6 +1,7 @@ package main import ( + "context" "fmt" repo "github.com/fsamin/go-repo" @@ -41,12 +42,13 @@ func workflow() *cobra.Command { func workflowNodeForCurrentRepo(projectKey, workflowName string) (int64, error) { //Try to get the latest commit - r, err := repo.New("") + ctx := context.Background() + r, err := repo.New(ctx, "") if err != nil { return 0, nil } - latestCommit, err := r.LatestCommit() + latestCommit, err := r.LatestCommit(ctx) if err != nil { return 0, fmt.Errorf("unable to get latest commit: %v", err) } diff --git a/cli/cdsctl/workflow_init.go b/cli/cdsctl/workflow_init.go index 419ee91e06..89a6439fb5 100644 --- a/cli/cdsctl/workflow_init.go +++ b/cli/cdsctl/workflow_init.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "context" "errors" "fmt" "io/ioutil" @@ -90,7 +91,7 @@ func interactiveChooseProject(gitRepo repo.Repo, defaultValue string) (string, e selected := cli.AskChoice("Choose the CDS project:", opts...) chosenProj = &projs[selected] - if err := gitRepo.LocalConfigSet("cds", "project", chosenProj.Key); err != nil { + if err := gitRepo.LocalConfigSet(context.Background(), "cds", "project", chosenProj.Key); err != nil { return "", err } @@ -105,8 +106,7 @@ func interactiveChooseVCSServer(proj *sdk.Project, gitRepo repo.Repo) (string, e case 1: return proj.VCSServers[0].Name, nil default: - - fetchURL, err := gitRepo.FetchURL() + fetchURL, err := gitRepo.FetchURL(context.Background()) if err != nil { return "", fmt.Errorf("Unable to get remote URL: %v", err) } @@ -451,7 +451,8 @@ func craftPipelineFile(proj *sdk.Project, existingPip *sdk.Pipeline, pipName, de func workflowInitRun(c cli.Values) error { path := "." - gitRepo, err := repo.New(path) + ctx := context.Background() + gitRepo, err := repo.New(ctx, path) if err != nil { return err } @@ -469,7 +470,7 @@ func workflowInitRun(c cli.Values) error { repoFullname := c.GetString("repository-fullname") if repoFullname == "" { - repoFullname, err = gitRepo.Name() + repoFullname, err = gitRepo.Name(ctx) if err != nil { return fmt.Errorf("unable to retrieve repository name: %v", err) } @@ -480,7 +481,7 @@ func workflowInitRun(c cli.Values) error { fetchURL := c.GetString("repository-url") if fetchURL == "" { - fetchURL, err = gitRepo.FetchURL() + fetchURL, err = gitRepo.FetchURL(ctx) if err != nil { return fmt.Errorf("unable to retrieve origin URL: %v", err) } @@ -600,11 +601,11 @@ func workflowInitRun(c cli.Values) error { } //Configure local git - if err := gitRepo.LocalConfigSet("cds", "project", proj.Key); err != nil { + if err := gitRepo.LocalConfigSet(ctx, "cds", "project", proj.Key); err != nil { fmt.Printf("error: unable to setup git local config to store cds project key: %v\n", err) } - if err := gitRepo.LocalConfigSet("cds", "workflow", workflowName); err != nil { + if err := gitRepo.LocalConfigSet(ctx, "cds", "workflow", workflowName); err != nil { fmt.Printf("error: unable to setup git local config to store cds workflow name: %v\n", err) } diff --git a/cli/cdsctl/workflow_run.go b/cli/cdsctl/workflow_run.go index e2157e3d61..b75ca6b0a3 100644 --- a/cli/cdsctl/workflow_run.go +++ b/cli/cdsctl/workflow_run.go @@ -1,6 +1,7 @@ package main import ( + "context" "encoding/json" "fmt" "os" @@ -106,10 +107,11 @@ func workflowRunManualRun(v cli.Values) error { return fmt.Errorf("Unable to get current path: %s", err) } var gitBranch, currentBranch, remoteURL string - r, err := repo.New(dir) + ctx := context.Background() + r, err := repo.New(ctx, dir) if err == nil { // If the directory is a git repository - currentBranch, _ = r.CurrentBranch() - remoteURL, err = r.FetchURL() + currentBranch, _ = r.CurrentBranch(ctx) + remoteURL, err = r.FetchURL(ctx) if err != nil { return sdk.WrapError(err, "cannot fetch the remote url") } diff --git a/cli/cdsctl/workflow_status.go b/cli/cdsctl/workflow_status.go index c5819672a0..3ba2de1e56 100644 --- a/cli/cdsctl/workflow_status.go +++ b/cli/cdsctl/workflow_status.go @@ -46,11 +46,12 @@ func workflowStatusRunWithTrack(v cli.Values) (interface{}, error) { var currentDisplay = new(cli.Display) // try to get the latest commit - r, err := repo.New(".") + ctx := context.Background() + r, err := repo.New(ctx, ".") if err != nil { return nil, fmt.Errorf("unable to get latest commit: %v", err) } - latestCommit, err := r.LatestCommit() + latestCommit, err := r.LatestCommit(ctx) if err != nil { return nil, fmt.Errorf("unable to get latest commit: %v", err) } @@ -74,13 +75,8 @@ func workflowStatusRunWithTrack(v cli.Values) (interface{}, error) { runNumber = runs[0].Number } - run, err := client.WorkflowRunGet(v.GetString(_ProjectKey), v.GetString(_WorkflowName), runNumber) - if err != nil { - return nil, err - } - for { - run, err = client.WorkflowRunGet(v.GetString(_ProjectKey), v.GetString(_WorkflowName), runNumber) + run, err := client.WorkflowRunGet(v.GetString(_ProjectKey), v.GetString(_WorkflowName), runNumber) if err != nil { return nil, err } diff --git a/engine/repositories/processor_checkout.go b/engine/repositories/processor_checkout.go index 3fb061ba64..7a5e0a9412 100644 --- a/engine/repositories/processor_checkout.go +++ b/engine/repositories/processor_checkout.go @@ -15,14 +15,14 @@ func (s *Service) processCheckout(ctx context.Context, op *sdk.Operation) error log.Debug("processCheckout> repo cloned with current branch: %s", currentBranch) // Clean no commited changes if exists - if err := gitRepo.ResetHard("HEAD"); err != nil { + if err := gitRepo.ResetHard(ctx, "HEAD"); err != nil { return sdk.WithStack(err) } log.Debug("processCheckout> repo reset to HEAD") if op.Setup.Checkout.Tag != "" { log.Debug("processCheckout> fetching tag %s from %s", op.Setup.Checkout.Tag, op.URL) - if err := gitRepo.FetchRemoteTag("origin", op.Setup.Checkout.Tag); err != nil { + if err := gitRepo.FetchRemoteTag(ctx, "origin", op.Setup.Checkout.Tag); err != nil { return sdk.WithStack(err) } log.Info(ctx, "processCheckout> repository %s ready on tag '%s'", op.URL, op.Setup.Checkout.Tag) @@ -33,7 +33,7 @@ func (s *Service) processCheckout(ctx context.Context, op *sdk.Operation) error op.Setup.Checkout.Branch = op.RepositoryInfo.DefaultBranch } log.Debug("processCheckout> fetching branch %s from %s", op.Setup.Checkout.Branch, op.URL) - if err := gitRepo.FetchRemoteBranch("origin", op.Setup.Checkout.Branch); err != nil { + if err := gitRepo.FetchRemoteBranch(ctx, "origin", op.Setup.Checkout.Branch); err != nil { return sdk.WithStack(err) } @@ -41,23 +41,23 @@ func (s *Service) processCheckout(ctx context.Context, op *sdk.Operation) error if op.Setup.Checkout.Commit == "" { // Reset HARD to the latest commit of the remote branch (don't use pull because there can be conflicts if the remote was forced) log.Debug("processCheckout> resetting the branch %s from remote", op.Setup.Checkout.Branch) - if err := gitRepo.ResetHard("origin/" + op.Setup.Checkout.Branch); err != nil { + if err := gitRepo.ResetHard(ctx, "origin/"+op.Setup.Checkout.Branch); err != nil { return sdk.WithStack(err) } } else { - currentCommit, err := gitRepo.LatestCommit() + currentCommit, err := gitRepo.LatestCommit(ctx) if err != nil { return sdk.WithStack(err) } if currentCommit.LongHash != op.Setup.Checkout.Commit { // Not the same commit, pull and reset HARD the commit log.Debug("processCheckout> resetting the branch %s from remote", op.Setup.Checkout.Branch) - if err := gitRepo.ResetHard("origin/" + op.Setup.Checkout.Branch); err != nil { + if err := gitRepo.ResetHard(ctx, "origin/"+op.Setup.Checkout.Branch); err != nil { return sdk.WithStack(err) } log.Debug("Repositories> processCheckout> resetting commit %s", op.Setup.Checkout.Commit) - if err := gitRepo.ResetHard(op.Setup.Checkout.Commit); err != nil { + if err := gitRepo.ResetHard(ctx, op.Setup.Checkout.Commit); err != nil { return sdk.WithStack(err) } } diff --git a/engine/repositories/processor_common.go b/engine/repositories/processor_common.go index 2d2ebba5bf..4a487a5b30 100644 --- a/engine/repositories/processor_common.go +++ b/engine/repositories/processor_common.go @@ -28,21 +28,21 @@ func (s *Service) processGitClone(ctx context.Context, op *sdk.Operation) (repo. opts = append(opts, repo.WithHTTPAuth(op.RepositoryStrategy.User, op.RepositoryStrategy.Password)) } - gitRepo, err := repo.New(r.Basedir, opts...) + gitRepo, err := repo.New(ctx, r.Basedir, opts...) if err != nil { log.Info(ctx, "processGitClone> cloning %s into %s", r.URL, r.Basedir) - gitRepo, err = repo.Clone(r.Basedir, r.URL, opts...) + gitRepo, err = repo.Clone(ctx, r.Basedir, r.URL, opts...) if err != nil { return gitRepo, "", "", sdk.NewErrorFrom(err, "cannot clone repository at given url: %s", r.URL) } } - f, err := gitRepo.FetchURL() + f, err := gitRepo.FetchURL(ctx) if err != nil { return gitRepo, "", "", sdk.WithStack(err) } - d, err := gitRepo.DefaultBranch() + d, err := gitRepo.DefaultBranch(ctx) if err != nil { return gitRepo, "", "", sdk.WithStack(err) } @@ -54,7 +54,7 @@ func (s *Service) processGitClone(ctx context.Context, op *sdk.Operation) (repo. } //Check branch - currentBranch, err := gitRepo.CurrentBranch() + currentBranch, err := gitRepo.CurrentBranch(ctx) if err != nil { return gitRepo, "", "", sdk.WithStack(err) } diff --git a/engine/repositories/processor_loadfiles.go b/engine/repositories/processor_loadfiles.go index 2705b029b0..d8fa2259dd 100644 --- a/engine/repositories/processor_loadfiles.go +++ b/engine/repositories/processor_loadfiles.go @@ -12,7 +12,7 @@ import ( func (s *Service) processLoadFiles(ctx context.Context, op *sdk.Operation) error { r := s.Repo(*op) - gitRepo, err := repo.New(r.Basedir) + gitRepo, err := repo.New(ctx, r.Basedir) if err != nil { return sdk.WithStack(err) } diff --git a/engine/repositories/processor_push.go b/engine/repositories/processor_push.go index bfe66477b3..525c84dbee 100644 --- a/engine/repositories/processor_push.go +++ b/engine/repositories/processor_push.go @@ -31,7 +31,7 @@ func (s *Service) processPush(ctx context.Context, op *sdk.Operation) error { } // FIXME create Fetch and FetchTags method in go repo - if err := gitRepo.FetchRemoteBranch("origin", op.RepositoryInfo.DefaultBranch); err != nil { + if err := gitRepo.FetchRemoteBranch(ctx, "origin", op.RepositoryInfo.DefaultBranch); err != nil { return sdk.WrapError(err, "cannot fetch changes from remote at %s", op.RepositoryInfo.FetchURL) } @@ -41,25 +41,25 @@ func (s *Service) processPush(ctx context.Context, op *sdk.Operation) error { // Switch to target branch if currentBranch != op.Setup.Push.FromBranch { - if err := gitRepo.CheckoutNewBranch(op.Setup.Push.FromBranch); err != nil { + if err := gitRepo.CheckoutNewBranch(ctx, op.Setup.Push.FromBranch); err != nil { if !strings.Contains(err.Error(), "already exists") { return sdk.WrapError(err, "cannot checkout new branch %s", op.Setup.Push.FromBranch) } - if err := gitRepo.Checkout(op.Setup.Push.FromBranch); err != nil { + if err := gitRepo.Checkout(ctx, op.Setup.Push.FromBranch); err != nil { return sdk.WrapError(err, "cannot checkout existing branch %s", op.Setup.Push.FromBranch) } } } // Reset hard to remote branch or default if no remote exists - _, hasUpstream := gitRepo.LocalBranchExists(op.Setup.Push.FromBranch) + _, hasUpstream := gitRepo.LocalBranchExists(ctx, op.Setup.Push.FromBranch) if hasUpstream { - if err := gitRepo.ResetHard("origin/" + op.Setup.Push.FromBranch); err != nil { + if err := gitRepo.ResetHard(ctx, "origin/"+op.Setup.Push.FromBranch); err != nil { return sdk.WithStack(err) } } else { // Reset hard default branch - if err := gitRepo.ResetHard("origin/" + op.RepositoryInfo.DefaultBranch); err != nil { + if err := gitRepo.ResetHard(ctx, "origin/"+op.RepositoryInfo.DefaultBranch); err != nil { return sdk.WithStack(err) } } @@ -99,12 +99,12 @@ func (s *Service) processPush(ctx context.Context, op *sdk.Operation) error { return sdk.WrapError(err, "closing file %s", fname) } } - if err := gitRepo.Add(path + "/.cds/*"); err != nil { + if err := gitRepo.Add(ctx, path+"/.cds/*"); err != nil { return sdk.WrapError(err, "git add file %s", path+"/.cds/*") } // In case that there are no changes (ex: push changes on an existing branch that was not merged) - if !gitRepo.ExistsDiff() { + if !gitRepo.ExistsDiff(ctx) { return sdk.WrapError(sdk.ErrNothingToPush, "processPush> %s : no files changes", op.UUID) } @@ -113,12 +113,12 @@ func (s *Service) processPush(ctx context.Context, op *sdk.Operation) error { if op.User.Username != "" && op.User.Email != "" { opts = append(opts, repo.WithUser(op.User.Email, op.User.Username)) } - if err := gitRepo.Commit(op.Setup.Push.Message, opts...); err != nil { + if err := gitRepo.Commit(ctx, op.Setup.Push.Message, opts...); err != nil { return sdk.WithStack(err) } // Push branch - if err := gitRepo.Push("origin", op.Setup.Push.FromBranch); err != nil { + if err := gitRepo.Push(ctx, "origin", op.Setup.Push.FromBranch); err != nil { return sdk.WrapError(err, "push %s", op.Setup.Push.FromBranch) } diff --git a/go.mod b/go.mod index 4826ce6b71..e43c9b687f 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/fortytw2/leaktest v1.2.0 // indirect github.com/frankban/quicktest v1.6.0 // indirect github.com/fsamin/go-dump v1.0.9 - github.com/fsamin/go-repo v0.1.7 + github.com/fsamin/go-repo v0.1.8 github.com/fsamin/go-shredder v0.0.0-20180118184739-b2488aedb5be github.com/gambol99/go-marathon v0.0.0-20170922093320-ec4a50170df7 github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 // indirect diff --git a/go.sum b/go.sum index ececba98e1..9414fe53a0 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,8 @@ github.com/frankban/quicktest v1.6.0 h1:Cd62nl66vQsx8Uv1t8M0eICyxIwZG7MxiAOrdnnU github.com/frankban/quicktest v1.6.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsamin/go-dump v1.0.9 h1:3MAneAJLnGfKTJtFEAdgrD+QqqK2Hwj7EJUQMQZcDls= github.com/fsamin/go-dump v1.0.9/go.mod h1:ZgKd2aOXAFFbbFuUgvQhu7mwTlI3d3qnTICMWdvAa9o= -github.com/fsamin/go-repo v0.1.7 h1:cQ+ALKxDzxuNAqbvn8gT7yQSb9iO7ax15QgTGLfFaU8= -github.com/fsamin/go-repo v0.1.7/go.mod h1:JRLbo6sPXvAwwGs5RgifFk1pXiefeGf0hyHifEg1Vw4= +github.com/fsamin/go-repo v0.1.8 h1:xwJj+3VFbsn1aa7mP9+NUebrJ1AXqgcqVzxQbtk2OpE= +github.com/fsamin/go-repo v0.1.8/go.mod h1:JRLbo6sPXvAwwGs5RgifFk1pXiefeGf0hyHifEg1Vw4= github.com/fsamin/go-shredder v0.0.0-20180118184739-b2488aedb5be h1:UhjSvwE1gxUYfekK9BXZ/LL55we9Avg+2Pt0PIlMYCk= github.com/fsamin/go-shredder v0.0.0-20180118184739-b2488aedb5be/go.mod h1:kuiNcf1lKxl4isIY6bHxbBatpLD43c2RKWIV/AGlhXY= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=