mirror of
https://github.com/anotherhadi/github-recon.git
synced 2026-10-05 19:08:24 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e572d1326a | ||
|
|
0017d649d3 |
@@ -39,6 +39,9 @@ func Username(settings github_recon_settings.Settings) (result UsernameResult, e
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if result.User == (UserResult{}) {
|
||||
return
|
||||
}
|
||||
utils.PrintAvatar(settings, result.User.AvatarURL)
|
||||
utils.PrintStruct(settings, result.User, 0)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ type UserResult struct {
|
||||
func User(s github_recon_settings.Settings) (response UserResult, err error) {
|
||||
user, resp, err := s.Client.Users.Get(s.Ctx, s.Target)
|
||||
if resp.StatusCode == 404 {
|
||||
return UserResult{}, fmt.Errorf("user not found with username: %s", s.Target)
|
||||
return UserResult{}, nil
|
||||
}
|
||||
if err != nil {
|
||||
return UserResult{}, fmt.Errorf("failed to fetch user's information")
|
||||
|
||||
Reference in New Issue
Block a user