Author SHA1 Message Date
dependabot[bot] 1b908c870f Bump golang.org/x/image from 0.28.0 to 0.38.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.28.0 to 0.38.0.
- [Commits](https://github.com/golang/image/compare/v0.28.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.38.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-03-30 16:27:16 +00:00
Hadi e74f69daf7 return an empty list instead of an error if no result
Signed-off-by: Hadi <[email protected]>
2025-09-25 19:15:16 +02:00
5 changed files with 15 additions and 4 deletions
+4 -1
View File
@@ -58,12 +58,15 @@ func main() {
}
profiles, err := gravatar_recon.GetGravatarProfiles(email)
if err != nil {
if err != nil || profiles == nil {
log.Fatal("Failed to get Gravatar profile", "err", err)
}
if !*silent {
utils.Header()
if len(*profiles) == 0 {
utils.PrintNoResultFound()
}
for _, profile := range *profiles {
utils.PrintTitle(profile.PreferredUser + ":")
if *printAvatar {
+1 -1
View File
@@ -23,6 +23,6 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/image v0.28.0 // indirect
golang.org/x/image v0.38.0 // indirect
golang.org/x/sys v0.30.0 // indirect
)
+2 -2
View File
@@ -39,8 +39,8 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/image v0.28.0 h1:gdem5JW1OLS4FbkWgLO+7ZeFzYtL3xClb97GaUzYMFE=
golang.org/x/image v0.28.0/go.mod h1:GUJYXtnGKEUgggyzh+Vxt+AviiCcyiwpsl8iQ8MvwGY=
golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE=
golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+4
View File
@@ -91,6 +91,10 @@ func GetGravatarProfiles(email string) (*[]GravatarProfile, error) {
}
defer resp.Body.Close()
if resp.StatusCode == 404 {
return &[]GravatarProfile{}, nil
}
if resp.StatusCode != 200 {
return nil, fmt.Errorf("no gravatar profile found (status %d)", resp.StatusCode)
}
+4
View File
@@ -133,6 +133,10 @@ func PrintTitle(title string) {
fmt.Println(titleStyle.Render(title) + "\n")
}
func PrintNoResultFound() {
fmt.Println(titleStyle.Render("No result found"))
}
func PrintAvatar(url string) {
if url == "" {
return