Closed RiverIsWeak closed 4 months ago
and i find this version is the latest version in https://pkg.go.dev/github.com/xanzy/go-gitlab?tab=versions
What do you expect instead? You created a client without error, that you can use to call (for example) a list of users (like it's done in line 5 of that example). There is no "connect" happening in that step
What do you expect instead? You created a client without error, that you can use to call (for example) a list of users (like it's done in line 5 of that example). There is no "connect" happening in that step
I think there should be an explicit err prompt that the connection is invalid, like java to throw a custom exception(I am a java developer and am using go-gitlab as my first framework for learning the go language 😆) @vntw
Well, you will get that error when you actually call something, for example
users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{})
with an invalid endpoint or invalid credentials but not when creating a new client. Logging success connect
is wrong, it doesn't connect to anything yet, it just created a client. The error shows up correctly immediately after (List projects failed…
in your screenshot) when the library tries to access the GitLab API for the first time.
Well, you will get that error when you actually call something, for example
users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{})
with an invalid endpoint or invalid credentials but not when creating a new client. Logging
success connect
is wrong, it doesn't connect to anything yet, it just created a client. The error shows up correctly immediately after (List projects failed…
in your screenshot) when the library tries to access the GitLab API for the first time.
I got your mean,and thank you for your reply. Have a wonderful day.😆 @vntw
your code demo is![image](https://github.com/xanzy/go-gitlab/assets/49878023/ad80fe15-8ce9-4006-b0ca-d2a58797da99)
But when I used this example to learn the framework, I suddenly found that no matter what I filled in, it would not produce the result of err! = nil.![image](https://github.com/xanzy/go-gitlab/assets/49878023/6802ae0f-78ea-4f4a-b61e-ac6b9cacd9b0)
my go-gitlab version is this
github.com/xanzy/go-gitlab v0.102.0
Looking forward to your reply, thanks