Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Commit

Permalink
adapted to seekret lib changes
Browse files Browse the repository at this point in the history
  • Loading branch information
apuigsech committed Aug 19, 2016
1 parent 81b9a7c commit 9670efa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import (
"fmt"
"github.com/libgit2/git2go"
"strings"
seekret "github.com/apuigsech/seekret/lib"
"github.com/apuigsech/seekret"
"github.com/apuigsech/seekret/models"
)

type gitSeekretConfig struct {
Expand Down Expand Up @@ -178,7 +179,7 @@ func openGitConfig(configLevel git.ConfigLevel, repo string) (*git.Config, error
}


func buildRulesEnabledString(listRules []seekret.Rule) string {
func buildRulesEnabledString(listRules []models.Rule) string {
rulesenabled := make([]string, 0, len(listRules))
for _,rule := range listRules {
if rule.Enabled {
Expand Down
2 changes: 1 addition & 1 deletion gitseekret.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
seekret "github.com/apuigsech/seekret/lib"
"github.com/apuigsech/seekret"
"github.com/libgit2/git2go"
)

Expand Down
4 changes: 2 additions & 2 deletions hook_pre-commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"
"runtime"
seekret "github.com/apuigsech/seekret/lib"
"github.com/apuigsech/seekret-source-git"
)

func HookPreCommitEnable(args []string) (string,error) {
Expand All @@ -20,7 +20,7 @@ func HookPreCommitRun(args []string) (error) {
"staged": true,
}

err := gs.seekret.LoadObjects(seekret.SourceTypeGit, ".", options)
err := gs.seekret.LoadObjects(sourcegit.SourceTypeGit, ".", options)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions main_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"github.com/urfave/cli"
"github.com/libgit2/git2go"
seekret "github.com/apuigsech/seekret/lib"
"github.com/apuigsech/seekret-source-git"
)

func GitSeekretCheck(c *cli.Context) error {
Expand All @@ -32,7 +32,7 @@ func GitSeekretCheck(c *cli.Context) error {
options["staged"] = true
}

err = gs.seekret.LoadObjects(seekret.SourceTypeGit, ".", options)
err = gs.seekret.LoadObjects(sourcegit.SourceTypeGit, ".", options)
if err != nil {
return err
}
Expand Down

0 comments on commit 9670efa

Please sign in to comment.