Skip to content

Commit

Permalink
remove logger.ErrorIf
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Apr 27, 2019
1 parent cc07c1e commit 81acf0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 2 additions & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ func doImport(c *cli.Context) error {
}

remote, err := NewRemoteRepository(url)
if logger.ErrorIf(err) {
if err != nil {
logger.Log("error", err.Error())
continue
}
if remote.IsValid() == false {
Expand Down
8 changes: 0 additions & 8 deletions logger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ func Log(prefix, message string) {
logger.Log(prefix, message)
}

func ErrorIf(err error) bool {
if err != nil {
Log("error", err.Error())
return true
}
return false
}

func PanicIf(err error) {
if err != nil {
panic(err)
Expand Down

0 comments on commit 81acf0d

Please sign in to comment.