Skip to content

Commit

Permalink
Merge pull request dwisiswant0#4 from Rishang/master
Browse files Browse the repository at this point in the history
Fixed gologger msg errors
  • Loading branch information
dw1 authored Mar 12, 2021
2 parents 9a454e9 + 5876033 commit 0fba389
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

func Err(e error) {
if e != nil {
log.Errorf("%s\n", e)
log.Error().Msgf("%s\n", e)
os.Exit(1)
}
}
Expand Down Expand Up @@ -108,19 +108,19 @@ func main() {
if !silent {
c := color.New(color.FgCyan, color.Bold)
c.Println(banner)
log.Labelf("Use at your own risk! Developers assume no responsibility")
log.Labelf("If your IP address has been blocked by search engine providers or other reason.")
log.Infof("Query : %s", query)
log.Infof("Page : %s", strconv.Itoa(page))
log.Warning().Msgf("Use at your own risk! Developers assume no responsibility")
log.Warning().Msgf("If your IP address has been blocked by search engine providers or other reason.")
log.Info().Msgf("Query : %s", query)
log.Info().Msgf("Page : %s", strconv.Itoa(page))
if proxy != "" {
log.Infof("Proxy : %s", proxy)
log.Info().Msgf("Proxy : %s", proxy)
}
if len(headers) > 0 {
for _, h := range headers {
log.Infof("Header: %s", h)
log.Info().Msgf("Header: %s", h)
}
}
log.Infof("Engine: %s\n\n", strings.Title(engine))
log.Info().Msgf("Engine: %s\n\n", strings.Title(engine))
}

stat, _ := os.Stdin.Stat()
Expand All @@ -141,7 +141,7 @@ func main() {
}
} else {
if query == "" {
log.Fatalf("Missing required -q flag!")
log.Fatal().Msgf("Missing required -q flag!")
os.Exit(2)
}

Expand Down

0 comments on commit 0fba389

Please sign in to comment.