Skip to content

Commit

Permalink
Move Exec to its own package under internal/pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixep committed Apr 5, 2019
1 parent c5aed34 commit 39e9c2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cmd/crowlet/crowlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"os"
"time"

exec "github.com/Pixep/crowlet/internal/pkg"
"github.com/Pixep/crowlet/pkg/crawler"
"github.com/Pixep/crowlet/util"

log "github.com/Sirupsen/logrus"
"github.com/urfave/cli"
)
Expand All @@ -31,7 +32,7 @@ func beforeApp(c *cli.Context) error {
}

if len(c.GlobalString("pre-cmd")) > 1 {
ok := util.Exec(c.GlobalString("pre-cmd"))
ok := exec.Exec(c.GlobalString("pre-cmd"))
if !ok {
log.Fatal("Failed to execute command")
}
Expand All @@ -42,7 +43,7 @@ func beforeApp(c *cli.Context) error {

func afterApp(c *cli.Context) error {
if len(c.GlobalString("post-cmd")) > 1 {
ok := util.Exec(c.GlobalString("post-cmd"))
ok := exec.Exec(c.GlobalString("post-cmd"))
if !ok {
log.Fatal("Failed to execute command")
}
Expand Down
2 changes: 1 addition & 1 deletion util/exec.go → internal/pkg/exec.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package util
package exec

import (
"bufio"
Expand Down

0 comments on commit 39e9c2d

Please sign in to comment.